CN115263112A - Method and system for generating simulated Hall signal of anti-pinch module of glass lifter - Google Patents

Method and system for generating simulated Hall signal of anti-pinch module of glass lifter Download PDF

Info

Publication number
CN115263112A
CN115263112A CN202210816771.2A CN202210816771A CN115263112A CN 115263112 A CN115263112 A CN 115263112A CN 202210816771 A CN202210816771 A CN 202210816771A CN 115263112 A CN115263112 A CN 115263112A
Authority
CN
China
Prior art keywords
signal
motor
pulse width
hall
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210816771.2A
Other languages
Chinese (zh)
Other versions
CN115263112B (en
Inventor
刘建国
周子涵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan University of Technology WUT
Original Assignee
Wuhan University of Technology WUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan University of Technology WUT filed Critical Wuhan University of Technology WUT
Priority to CN202210816771.2A priority Critical patent/CN115263112B/en
Publication of CN115263112A publication Critical patent/CN115263112A/en
Application granted granted Critical
Publication of CN115263112B publication Critical patent/CN115263112B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • EFIXED CONSTRUCTIONS
    • E05LOCKS; KEYS; WINDOW OR DOOR FITTINGS; SAFES
    • E05FDEVICES FOR MOVING WINGS INTO OPEN OR CLOSED POSITION; CHECKS FOR WINGS; WING FITTINGS NOT OTHERWISE PROVIDED FOR, CONCERNED WITH THE FUNCTIONING OF THE WING
    • E05F15/00Power-operated mechanisms for wings
    • E05F15/40Safety devices, e.g. detection of obstructions or end positions
    • EFIXED CONSTRUCTIONS
    • E05LOCKS; KEYS; WINDOW OR DOOR FITTINGS; SAFES
    • E05FDEVICES FOR MOVING WINGS INTO OPEN OR CLOSED POSITION; CHECKS FOR WINGS; WING FITTINGS NOT OTHERWISE PROVIDED FOR, CONCERNED WITH THE FUNCTIONING OF THE WING
    • E05F15/00Power-operated mechanisms for wings
    • E05F15/60Power-operated mechanisms for wings using electrical actuators
    • E05F15/603Power-operated mechanisms for wings using electrical actuators using rotary electromotors
    • E05F15/665Power-operated mechanisms for wings using electrical actuators using rotary electromotors for vertically-sliding wings
    • E05F15/689Power-operated mechanisms for wings using electrical actuators using rotary electromotors for vertically-sliding wings specially adapted for vehicle windows
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P29/00Arrangements for regulating or controlling electric motors, appropriate for both AC and DC motors
    • EFIXED CONSTRUCTIONS
    • E05LOCKS; KEYS; WINDOW OR DOOR FITTINGS; SAFES
    • E05YINDEXING SCHEME ASSOCIATED WITH SUBCLASSES E05D AND E05F, RELATING TO CONSTRUCTION ELEMENTS, ELECTRIC CONTROL, POWER SUPPLY, POWER SIGNAL OR TRANSMISSION, USER INTERFACES, MOUNTING OR COUPLING, DETAILS, ACCESSORIES, AUXILIARY OPERATIONS NOT OTHERWISE PROVIDED FOR, APPLICATION THEREOF
    • E05Y2900/00Application of doors, windows, wings or fittings thereof
    • E05Y2900/50Application of doors, windows, wings or fittings thereof for vehicles
    • E05Y2900/53Type of wing
    • E05Y2900/55Windows
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P40/00Technologies relating to the processing of minerals
    • Y02P40/50Glass production, e.g. reusing waste heat during processing or shaping
    • Y02P40/57Improving the yield, e-g- reduction of reject rates

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Engineering (AREA)
  • Control Of Motors That Do Not Use Commutators (AREA)

Abstract

The invention discloses a method for generating a simulated Hall signal of an anti-pinch module of a glass lifter, which comprises the following steps: s100, according to an actual road spectrogram, a motor direction signal and a pulse number are obtained through feedback of a Hall signal generation module, a pulse width signal is obtained through calculation according to the pulse number, and a Hall signal is obtained through calculation according to the motor direction signal and the pulse width signal; s200, judging whether the pulse width value is 0, if so, keeping the original value of the Hall signal, skipping to S100 and executing S100 again; if not, judging a motor direction signal; s300, judging the rotation direction of the motor, and adjusting a pulse width count value t; when T is larger than or equal to T-1, reversing the Hall signal, generating a pulse number as the mark information of pulse width counting end and outputting the mark information; s400, inputting the pulse number serving as the mark information of pulse width counting end into a road spectrum chart, acquiring a corresponding pulse width value and calculating to obtain a Hall signal. The invention solves a plurality of technical problems existing in the prior simulation stage and ensures better reliability and accuracy in the simulation stage.

Description

Method and system for generating simulated Hall signal of anti-pinch module of glass lifter
Technical Field
The invention belongs to the field of automotive electronics, and particularly relates to a method and a system for generating a simulated Hall signal of an anti-pinch module of a glass lifter.
Background
With the continuous development of automotive electronics, the continuous progress of the automotive industry and the rapid improvement of human living standard, modern automobiles usually pay more attention to the comfort and safety of vehicles in order to meet the requirements of human beings on safety and convenience. With the technological accumulation and popularization of automotive electronic systems, modern family cars are often equipped with window anti-pinch systems. Safety requirements are also a concern for users, and window pinching prevention has become an essential component for achieving vehicle safety.
At the present stage, a Hall motor is generally adopted as a glass lifter driving motor, and force, displacement, rotating speed and the like can be measured through Hall sensor conversion. Therefore, in the simulation stage, the generated hall signal is often required to be simulated, so as to calculate the rotating speed of the motor and the stroke of the glass, judge the running direction of the motor and the like, and therefore how to correctly simulate the hall signal is a very important ring.
Disclosure of Invention
The invention aims to provide a method and a system for generating a simulated Hall signal of an anti-pinch module of a glass lifter, so as to solve one or more technical problems in the conventional simulation stage and ensure better reliability and accuracy in the simulation stage.
In order to solve the technical problems, the technical scheme of the invention is as follows: a glass lifter anti-pinch module simulated Hall signal generation method comprises the following steps:
s100, according to an actual spectrogram, a motor direction signal and a pulse number are obtained through feedback of a Hall signal generation module, a pulse width signal at the moment is obtained through calculation according to the pulse number, and a Hall signal is obtained through calculation according to the motor direction signal and the pulse width signal;
s200, judging whether the pulse width value is 0, if so, keeping the original value of the Hall signal, skipping to S100 and executing S100 again; if not, judging a motor direction signal;
s300, judging the rotation direction of the motor according to the motor direction signal value, calculating the motor stalling time at the moment, and adjusting a real-time pulse width count value t according to the stalling time; when T is larger than or equal to T-1, reversing the Hall signal, generating a pulse number as the mark information of pulse width counting end and outputting the mark information; wherein T is a pulse width value;
and S400, inputting the pulse number serving as the mark information of pulse width counting end into a road spectrum chart, acquiring a corresponding pulse width value, and skipping to S100 to calculate to obtain a Hall signal.
S300 specifically comprises:
s310, if the input motor direction signal is 0, the motor is in a stalling state, at the moment, the stalling time is calculated, the value of the time is increased by 1, and meanwhile, the current position of the mark is 0;
s320, if the input motor direction signal is 1, the motor is indicated to rotate forwards, the glass is in a rising state, the flag position is set to be 1, the motor stalling time at the moment is judged, when the motor stalling time is larger than a set threshold value, the stalling time is set to be 0, and the real-time pulse width counting value t is set to be 0; otherwise, only setting the stall time to 0; when T is less than T-1, increasing the value of T by 1, reversing the Hall signal when T is equal to T/2, and jumping to S100 and re-executing S100 when T is not equal to T/2; when T is more than or equal to T-1, reversing the Hall signal, simultaneously subtracting 1 from the pulse number, outputting a mark information of pulse width counting completion, and entering S400;
s330, if the input motor direction signal is-1, the motor is indicated to be reversely rotated, the glass is in a descending state, whether the flag bit is-1 or not is judged, if not, t is set to be 0, and the flag bit is set to be-1; if the flag bit is-1, entering S400; when T is less than T-1, increasing the value of T by 1, when T is equal to T/2, reversing the Hall signal, when T is not equal to T/2, jumping to S100 and re-executing S100; and when T is larger than or equal to T-1, reversing the Hall signal, adding 1 to the pulse number, outputting mark information of pulse width counting end, jumping to S100 and executing S100 again.
Two Hall sensors are arranged, and when the included angle between the two Hall sensors and the central connecting line of the motor is alpha, the two Hall sensors comprise:
s100, according to an actual spectrogram, a motor direction signal and a pulse number are obtained through feedback of a Hall signal generation module, a pulse width signal at the moment is obtained through calculation according to the pulse number, and a Hall signal is obtained through calculation according to the motor direction signal and the pulse width signal;
s200, judging whether the pulse width value is 0, if so, keeping the original value of the Hall signal, skipping to S100 and executing S100 again; if not, judging a motor direction signal;
s340, if the input motor direction signal is 0, the motor is in a stalling state, at the moment, the stalling time is calculated, the value of the time is increased by 1, and meanwhile, the current position of the mark is 0;
s350, if the input motor direction signal is 1, the motor is indicated to rotate forwards, the glass is in a rising state, the flag position is 1, the motor stalling time at the moment is judged, when the motor stalling time is larger than a set threshold value, the stalling time is set to be 0, and the real-time pulse width count value t is set to be 0; otherwise, only setting the stall time to 0; increasing the value of T by 1 when T < T-1, reversing the hall signal when T is equal to (α -45) × T/90 or α × T/90, jumping to S100 and re-executing S100 when T is not equal to (α -45) × T/90 or α × T/90; when T is larger than or equal to T-1, setting T as 0, jumping to S100 and executing S100 again;
s360, if the input motor direction signal is-1, the motor is indicated to be reversely rotated, the glass is in a descending state, whether the flag bit is-1 or not is judged, if not, t is set to be 0, and the flag bit is set to be-1; if the flag bit is-1, jumping to S100 and re-executing S100; when T < T-1, the value of T is increased by 1, and when T is equal to (90- α) × T/90 or (135- α) × T/90, the hall signal is inverted, and when T is not equal to (90- α) × T/90 or (135- α) × T/90, the operation jumps to S100 and re-executes S100; when T > = T-1, the pulse width count value T is set to 0, the step jumps to S100 and the step re-executes S100.
When the Hall signal of one Hall sensor jumps, the phase difference of the Hall signals of the two Hall sensors is (90-alpha).
And when t is set to be 0, the motor position returns to the initial position.
The glass lifter anti-pinch module simulation Hall signal generation system comprises at least one Hall sensor, a motor, a Hall signal generation module and a controller; wherein the content of the first and second substances,
the Hall sensor is used for collecting Hall signals generated when the motor rotates;
the Hall signal generating module is used for obtaining a motor direction signal and the pulse number according to the feedback of an actual road spectrum diagram;
the controller is used for calculating to obtain a pulse width signal at the moment according to the pulse number and calculating to obtain a Hall signal according to the motor direction signal and the pulse width signal; judging whether the pulse width value is 0, if so, keeping the original value of the Hall signal, and calculating according to the motor direction signal and the pulse width signal to obtain the Hall signal; if not, judging a motor direction signal; judging the rotation direction of the motor according to the motor direction signal value, calculating the motor stalling time at the moment, and adjusting a real-time pulse width count value t according to the stalling time; when T is larger than or equal to T-1, reversing the Hall signal, generating a pulse number as the mark information of pulse width counting end and outputting the mark information; wherein T is a pulse width value; and inputting the pulse number as the mark information of pulse width counting end into a road spectrum chart, acquiring a corresponding pulse width value and calculating to obtain a Hall signal.
The specific steps for judging the rotation direction of the motor comprise:
if the input motor direction signal is 0, the motor is in a stalling state, at the moment, the stalling time is calculated, the value of the time is increased by 1, and meanwhile, the position of the mark at the moment is 0;
if the input motor direction signal is 1, the motor is indicated to rotate forwards, the glass is in a rising state, the flag position is 1, the motor stalling time at the moment is judged, when the motor stalling time is larger than a set threshold value, the stalling time is set to be 0, and the real-time pulse width count value t is set to be 0; otherwise, only setting the stall time to 0; when T is less than T-1, increasing the value of T by 1, reversing the Hall signal when T is equal to T/2, and calculating according to the motor direction signal and the pulse width signal to obtain the Hall signal when T is not equal to T/2; when T is larger than or equal to T-1, reversing the Hall signal, simultaneously subtracting 1 from the pulse number, outputting mark information of pulse width counting completion, and calculating according to the motor direction signal and the pulse width signal to obtain the Hall signal;
if the input motor direction signal is-1, the motor is indicated to be reversely rotated, the glass is in a descending state, whether the flag bit is-1 or not is judged, if not, t is set to be 0, and the flag bit is set to be-1; if the flag bit is-1, calculating according to the motor direction signal and the pulse width signal to obtain a Hall signal; when T is less than T-1, increasing the value of T by 1, when T is equal to T/2, reversing the Hall signal, and when T is not equal to T/2, calculating according to the motor direction signal and the pulse width signal to obtain the Hall signal; and when T is more than or equal to T-1, reversing the Hall signal, simultaneously adding 1 to the pulse number, outputting mark information indicating the end of pulse width counting, and calculating according to the motor direction signal and the pulse width signal to obtain the Hall signal.
The method comprises the following steps that two Hall sensors are arranged, and when the included angle between the two Hall sensors and the central connecting line of the motor is alpha, the working process of acquiring Hall signals is as follows:
according to an actual road spectrogram, a motor direction signal and a pulse number are obtained through feedback of a Hall signal generation module, a pulse width signal at the moment is obtained through calculation according to the pulse number, and a Hall signal is obtained through calculation according to the motor direction signal and the pulse width signal;
judging whether the pulse width value is 0, if so, keeping the original value of the Hall signal, and calculating according to the motor direction signal and the pulse width signal to obtain the Hall signal; if not, judging a motor direction signal;
if the input motor direction signal is 0, the motor is in a stalling state, at the moment, the stalling time is calculated, the value of the time is increased by 1, and meanwhile, the position of the mark at the moment is 0;
if the input motor direction signal is 1, the motor is indicated to rotate forwards, the glass is in a rising state, the flag position is 1 at the moment, the motor stalling time at the moment is judged, when the motor stalling time is larger than a set threshold value, the stalling time is set to be 0, and the real-time pulse width count value t is set to be 0; otherwise, only setting the stall time to 0; when T is less than T-1, increasing the value of T by 1, reversing the Hall signal when T is equal to (alpha-45) T/90 or alpha T/90, and calculating the Hall signal according to the motor direction signal and the pulse width signal when T is not equal to (alpha-45) T/90 or alpha T/90; when T is larger than or equal to T-1, setting T as 0, and calculating according to the motor direction signal and the pulse width signal to obtain a Hall signal;
if the input motor direction signal is-1, the motor is indicated to be reversely rotated, the glass is in a descending state, whether the flag bit is-1 or not is judged, if not, t is set to be 0, and the flag bit is set to be-1; if the flag bit is-1, calculating according to the motor direction signal and the pulse width signal to obtain a Hall signal; when T is less than T-1, the value of T is increased by 1, when T is equal to (90-alpha) T/90 or (135-alpha) T/90, the Hall signal is reversed, and when T is not equal to (90-alpha) T/90 or (135-alpha) T/90, the Hall signal is calculated according to the motor direction signal and the pulse width signal; and when T > = T-1, setting the pulse width count value T as 0, and calculating according to the motor direction signal and the pulse width signal to obtain the Hall signal.
When the Hall signal of one Hall sensor jumps, the phase difference of the Hall signals of the two Hall sensors is (90-alpha).
And when t is set to be 0, the motor position returns to the initial position.
Compared with the prior art, the invention has the beneficial effects that:
on the premise of ensuring the accuracy of the Hall signal, compared with the traditional Hall signal generation algorithm, the method is simpler and clearer, and meanwhile, the simulation of the double Hall sensors can be realized according to the actual degree requirement; the method is used in simulation, and the accuracy and efficiency of the algorithm can be improved.
Drawings
FIG. 1 is a flow chart of a method of an embodiment of the present invention;
FIG. 2 is a square wave diagram of a clockwise rotation Hall signal of a double Hall motor according to an embodiment of the invention;
fig. 3 is a square wave diagram of a hall signal rotated counterclockwise by a dual hall motor according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
In practice, the measured pulse width is generally a pulse width of a whole period, and includes a rising edge and a falling edge, as shown in fig. 1, the method can pass any input value through the hall signal generating module, and can directly convert the value into a hall square wave signal.
The technical scheme adopted by the invention for solving the technical problem is as follows: a glass lifter anti-pinch module simulated Hall signal generation method comprises the following steps:
step 100, as shown in fig. 1, inquiring the current pulse width according to the actual road spectrum by the pulse number fed back by the hall signal generating module. The queried pulse width and motor direction signals are transmitted to a Hall signal generation algorithm to generate Hall signals (namely Hall signals).
Step 200, firstly judging whether the input pulse width value is 0, if so, keeping the original state of the Hall signal and starting the jumping-out algorithm from the beginning; if not, continuing to operate;
step 300, if the input motor direction signal Dir =0, it indicates that the motor is in a stall state, at this time, the stall time is calculated, time = time +1, time is the stall time, and meanwhile, the mark position is 0;
step 400, if the input motor direction signal Dir =1, it indicates that the motor rotates forwards, the glass is in a rising state, at this time, the position 1 is marked, the motor stalling time is judged, when the motor stalling time is larger than a set threshold value, the stalling time is set to 0, and the real-time pulse width count value t is set to 0; otherwise only stall time is set to 0. When T is less than T-1, T is added with 1, when T is equal to T/2, the Hall signal is reversed, otherwise, the jump-out algorithm starts from the beginning; and when T > = T-1, reversing the Hall signal, simultaneously subtracting 1 from the pulse number pulsenum, outputting mark information of pulse width counting end, jumping out of the algorithm and starting from the beginning.
Step 500, if the input motor direction signal Dir = -1, the motor is indicated to rotate forwards, the glass is in a descending state, whether the flag bit is-1 or not is judged at the moment, if the flag bit is not-1, t is set to 0, and the flag bit is set to-1; if the flag bit is-1, the subsequent steps are directly performed. When T is less than T-1, T is added with 1, when T is equal to T/2, the Hall signal is reversed, otherwise, the jump-out algorithm starts from the beginning; and when T > = T-1, the Hall signal is reversed, the pulse number pulsenum is added with 1, mark information of pulse width counting completion is output, and the algorithm is skipped out and started from the beginning.
And step 600, when a mark information of pulse width counting end is output in the step, inputting the output pulse number pulsenum into a road spectrum diagram, searching a next pulse width value in the road spectrum diagram, and inputting the next pulse width value into a Hall signal generation algorithm.
For a dual hall sensor, the pulse width measurement algorithm established at this time is similar to that described above when the other hall sensor is offset by α degrees from the sensor, step 700. The same direction signal and pulse width signal as described above are input. The difference from the above is mainly the judgment relationship between the pulse width count value T and the pulse width value T when the motor rotates forwards and backwards. If the input motor direction signal Dir =1, the motor is indicated to rotate forwards, the glass is in a rising state, the position 1 is marked at the moment, the motor stalling time at the moment is judged, when the motor stalling time is larger than a set threshold value, the stalling time is set to be 0, and the real-time pulse width counting value t is set to be 0; otherwise only stall time is set to 0. When T is less than T-1, T is added with 1, when T is equal to (alpha-45) T/90, the Hall signal is reversed, when T is equal to alpha T/90, the Hall signal is reversed, otherwise, the jump-out algorithm starts from the beginning; when T > = T-1, set the pulse count T to 0, jump out of the algorithm, start from the beginning. If the input motor direction signal Dir = -1, the motor is indicated to be reversely rotated, the glass is in a descending state, whether the flag bit is-1 or not is judged at the moment, if the flag bit is not-1, t is set to be 0, and the flag bit is set to be-1; if the flag bit is-1, the subsequent steps are directly performed. When T < T-1, T is added by 1, when T is equal to (90-alpha) T/90, the Hall signal is inverted, when T is equal to (135-alpha) T/90, the Hall signal is inverted, otherwise, the jump-out algorithm starts from the beginning; when T > = T-1, the pulse width count value T is set to 0, and the algorithm is skipped, starting from the beginning.
The algorithm can completely simulate the actual situation, as shown in fig. 2, the situation that the motor rotates clockwise, the circle represents the rotating part of the motor, and the circle represents that there is a magnetic pole, and the circle does not represent that there is no magnetic pole. After the part with the magnetic pole passes through the Hall sensor, the Hall effect can be generated, so that the Hall signal jumps from 0 to 1. The double-Hall sensor, FIG. 2 shows the condition that the two Hall sensors have an angle difference of alpha, the double-Hall signal square wave on the right side of FIG. 2 is obtained through simulation of a Hall signal generating algorithm, the Hall sensor 2 firstly passes through a region with magnetic poles, at the moment, the Hall signal 2 jumps firstly, and the phase difference is (90-alpha).
In the case of counterclockwise rotation of the motor as shown in fig. 3, the hall sensor 1 first rotates through the magnetic pole area, so that the hall signal 1 first generates a jump, the order of generating the jump is changed relative to the forward rotation, and the phase difference still maintains the previous phase difference of 90 ° - α.
When the motor reaches the top dead center and the bottom dead center, the glass is about to descend or ascend, namely when the motor is about to rotate reversely, the motor is at a certain angle from the initial position. According to the algorithm, after t is set to be 0, the position of the motor can directly return to the initial position, and at the moment, the motor can directly start to reverse from the initial position, so that the correct double Hall pulse square wave required by people can be obtained. Although this would allow a small angle to be dropped each time the motor is reversed, the dropped angle is small and within an acceptable error range; and the glass lifter can be initialized again after finishing initializing normal operation for a plurality of times, and the upper dead point and the lower dead point are calibrated, so that the accumulated error can be directly cleared by 0, and the algorithm can simply, efficiently and stably output correct Hall pulse square waves.
The invention has the following beneficial effects: the algorithm provides a Hall signal generation algorithm for counting the pulse width, and compared with the traditional Hall signal generation algorithm, the algorithm is simpler and clearer on the premise of ensuring the accuracy of the Hall signal, and meanwhile, the simulation of double Hall sensors can be realized according to the actual degree requirement. The method is used in simulation, and the accuracy and efficiency of the algorithm can be improved.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A glass lifter anti-pinch module simulation Hall signal generation method is characterized by comprising the following steps:
s100, according to an actual spectrogram, a motor direction signal and a pulse number are obtained through feedback of a Hall signal generation module, a pulse width signal at the moment is obtained through calculation according to the pulse number, and a Hall signal is obtained through calculation according to the motor direction signal and the pulse width signal;
s200, judging whether the pulse width value is 0, if so, keeping the original value of the Hall signal, skipping to S100 and executing S100 again; if not, judging a motor direction signal;
s300, judging the rotation direction of the motor according to the motor direction signal value, calculating the motor stalling time at the moment, and adjusting a real-time pulse width count value t according to the stalling time; when T is larger than or equal to T-1, reversing the Hall signal, generating a pulse number as the mark information of pulse width counting end and outputting the mark information; wherein T is a pulse width value;
and S400, inputting the pulse number serving as the mark information of pulse width counting end into a road spectrum chart, acquiring a corresponding pulse width value, and skipping to S100 to calculate to obtain a Hall signal.
2. The method of claim 1, wherein the S300 specifically comprises:
s310, if the input motor direction signal is 0, the motor is in a stalling state, at the moment, the stalling time is calculated, the value of the time is increased by 1, and meanwhile, the current position of the mark is 0;
s320, if the input motor direction signal is 1, the motor is indicated to rotate forwards, the glass is in a rising state, the flag position is set to be 1, the motor stalling time at the moment is judged, when the motor stalling time is larger than a set threshold value, the stalling time is set to be 0, and the real-time pulse width counting value t is set to be 0; otherwise, only setting the stall time to 0; when T is less than T-1, increasing the value of T by 1, reversing the Hall signal when T is equal to T/2, and jumping to S100 and re-executing S100 when T is not equal to T/2; when T is larger than or equal to T-1, reversing the Hall signal, simultaneously subtracting 1 from the pulse number, outputting a mark information of pulse width counting end, and entering S400;
s330, if the input motor direction signal is-1, the motor is indicated to be reversely rotated, the glass is in a descending state, whether the flag bit is-1 or not is judged, if not, t is set to be 0, and the flag bit is set to be-1; if the flag bit is-1, entering S400; when T is less than T-1, increasing the value of T by 1, when T is equal to T/2, reversing the Hall signal, when T is not equal to T/2, jumping to S100 and executing S100 again; and when T is larger than or equal to T-1, reversing the Hall signal, adding 1 to the pulse number, outputting mark information of pulse width counting end, jumping to S100 and executing S100 again.
3. The method as claimed in claim 2, wherein the two hall sensors are arranged, and when an included angle between the two hall sensors and a central connecting line of the motor is α, the method comprises the following steps:
s100, according to an actual spectrogram, a motor direction signal and a pulse number are obtained through feedback of a Hall signal generation module, a pulse width signal at the moment is obtained through calculation according to the pulse number, and a Hall signal is obtained through calculation according to the motor direction signal and the pulse width signal;
s200, judging whether the pulse width value is 0, if so, keeping the original value of the Hall signal, skipping to S100 and executing S100 again; if not, judging a motor direction signal;
s340, if the input motor direction signal is 0, the motor is in a stalling state, at the moment, the stalling time is calculated, the value of the time is increased by 1, and meanwhile, the current position of the mark is 0;
s350, if the input motor direction signal is 1, the motor is indicated to rotate forwards, the glass is in a rising state, the flag position is 1 at the moment, the motor stalling time at the moment is judged, when the motor stalling time is larger than a set threshold value, the motor stalling time is set to be 0, and the real-time pulse width counting value t is set to be 0; otherwise, only setting the stall time to 0; increasing the value of T by 1 when T < T-1, reversing the hall signal when T is equal to (α -45) × T/90 or α × T/90, jumping to S100 and re-executing S100 when T is not equal to (α -45) × T/90 or α × T/90; when T is larger than or equal to T-1, setting T as 0, jumping to S100 and executing S100 again;
s360, if the input motor direction signal is-1, the motor is indicated to be reversely rotated, the glass is in a descending state, whether the flag bit is-1 or not is judged, if not, the t is set to be 0, and the flag bit is set to be-1; if the flag bit is-1, jumping to S100 and re-executing S100; when T < T-1, the value of T is increased by 1, and when T is equal to (90- α) × T/90 or (135- α) × T/90, the hall signal is inverted, and when T is not equal to (90- α) × T/90 or (135- α) × T/90, the operation jumps to S100 and re-executes S100; when T > = T-1, the pulse width count value T is set to 0, the step jumps to S100 and the step re-executes S100.
4. The method as claimed in claim 3, wherein when the Hall signal of one Hall sensor jumps, the Hall signals of the two Hall sensors are out of phase (90 ° - α).
5. The method of any of claims 2-4, wherein the motor position returns to the home position when t is set to 0.
6. A system for using the simulated hall signal generation method of claim 1 for a glass lifter anti-pinch module comprising at least one hall sensor, a motor, a hall signal generation module and a controller; wherein, the first and the second end of the pipe are connected with each other,
the Hall sensor is used for acquiring Hall signals generated when the motor rotates;
the Hall signal generating module is used for obtaining a motor direction signal and a pulse number according to the feedback of an actual road spectrum diagram;
the controller is used for calculating to obtain a pulse width signal at the moment according to the pulse number and calculating to obtain a Hall signal according to the motor direction signal and the pulse width signal; judging whether the pulse width value is 0, if so, keeping the original value of the Hall signal, and calculating according to the motor direction signal and the pulse width signal to obtain the Hall signal; if not, judging a motor direction signal; judging the rotation direction of the motor according to the motor direction signal value, calculating the motor stalling time at the moment, and adjusting a real-time pulse width count value t according to the stalling time; when T is larger than or equal to T-1, reversing the Hall signal, generating a pulse number as the mark information of pulse width counting end and outputting the mark information; wherein T is a pulse width value; and inputting the pulse number as the mark information of pulse width counting end into a road spectrum chart, acquiring a corresponding pulse width value and calculating to obtain a Hall signal.
7. The system of claim 6, wherein the step of determining the direction of rotation of the motor comprises:
if the input motor direction signal is 0, the motor is in a stalling state, at the moment, the stalling time is calculated, the value of the time is increased by 1, and meanwhile, the position of the mark at the moment is 0;
if the input motor direction signal is 1, the motor is indicated to rotate forwards, the glass is in a rising state, the flag position is 1, the motor stalling time at the moment is judged, when the motor stalling time is larger than a set threshold value, the stalling time is set to 0, and the real-time pulse width count value t is set to 0; otherwise, only setting the stall time to 0; when T is less than T-1, increasing the value of T by 1, reversing the Hall signal when T is equal to T/2, and calculating according to the motor direction signal and the pulse width signal to obtain the Hall signal when T is not equal to T/2; when T is larger than or equal to T-1, reversing the Hall signal, simultaneously subtracting 1 from the pulse number, outputting mark information of pulse width counting completion, and calculating according to the motor direction signal and the pulse width signal to obtain the Hall signal;
if the input motor direction signal is-1, the motor is indicated to be reversely rotated, the glass is in a descending state, whether the flag bit is-1 or not is judged, if not, t is set to be 0, and the flag bit is set to be-1; if the flag bit is-1, calculating according to the motor direction signal and the pulse width signal to obtain a Hall signal; when T is less than T-1, increasing the value of T by 1, when T is equal to T/2, reversing the Hall signal, and when T is not equal to T/2, calculating according to the motor direction signal and the pulse width signal to obtain the Hall signal; and when T is more than or equal to T-1, reversing the Hall signal, simultaneously adding 1 to the pulse number, outputting mark information indicating the end of pulse width counting, and calculating according to the motor direction signal and the pulse width signal to obtain the Hall signal.
8. The system according to claim 7, wherein two Hall sensors are provided, and when the included angle between the two Hall sensors and the central connecting line of the motor is alpha, the working process of acquiring the Hall signals is as follows:
according to an actual road spectrogram, a motor direction signal and a pulse number are obtained through feedback of a Hall signal generation module, a pulse width signal at the moment is obtained through calculation according to the pulse number, and a Hall signal is obtained through calculation according to the motor direction signal and the pulse width signal;
judging whether the pulse width value is 0, if so, keeping the original value of the Hall signal, and calculating according to the motor direction signal and the pulse width signal to obtain the Hall signal; if not, judging a motor direction signal;
if the input motor direction signal is 0, the motor is in a stalling state, at the moment, the stalling time is calculated, the value of the time is increased by 1, and meanwhile, the position of the mark at the moment is 0;
if the input motor direction signal is 1, the motor is indicated to rotate forwards, the glass is in a rising state, the flag position is 1 at the moment, the motor stalling time at the moment is judged, when the motor stalling time is larger than a set threshold value, the stalling time is set to 0, and the real-time pulse width count value t is set to 0; otherwise, only setting the stall time to 0; when T is less than T-1, increasing the value of T by 1, reversing the Hall signal when T is equal to (alpha-45) T/90 or alpha T/90, and calculating according to the motor direction signal and the pulse width signal when T is not equal to (alpha-45) T/90 or alpha T/90 to obtain the Hall signal; when T is larger than or equal to T-1, setting T as 0, and calculating according to the motor direction signal and the pulse width signal to obtain a Hall signal;
if the input motor direction signal is-1, the motor is indicated to be reversely rotated, the glass is in a descending state, whether the flag bit is-1 or not is judged, if not, t is set to be 0, and the flag bit is set to be-1; if the flag bit is-1, calculating according to the motor direction signal and the pulse width signal to obtain a Hall signal; when T is less than T-1, the value of T is increased by 1, when T is equal to (90-alpha) T/90 or (135-alpha) T/90, the Hall signal is reversed, and when T is not equal to (90-alpha) T/90 or (135-alpha) T/90, the Hall signal is calculated according to the motor direction signal and the pulse width signal; and when T > = T-1, setting the pulse width counting value T as 0, and calculating according to the motor direction signal and the pulse width signal to obtain a Hall signal.
9. The system of claim 8, wherein when the hall signal of one of the hall sensors transitions, the hall signals of the two hall sensors are out of phase (90 ° - α).
10. A system according to any of claims 7-9, characterized in that the motor position is returned to the initial position when t is set to 0.
CN202210816771.2A 2022-07-12 2022-07-12 Method and system for generating analog Hall signal of anti-clamping module of glass lifter Active CN115263112B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210816771.2A CN115263112B (en) 2022-07-12 2022-07-12 Method and system for generating analog Hall signal of anti-clamping module of glass lifter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210816771.2A CN115263112B (en) 2022-07-12 2022-07-12 Method and system for generating analog Hall signal of anti-clamping module of glass lifter

Publications (2)

Publication Number Publication Date
CN115263112A true CN115263112A (en) 2022-11-01
CN115263112B CN115263112B (en) 2024-02-23

Family

ID=83766555

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210816771.2A Active CN115263112B (en) 2022-07-12 2022-07-12 Method and system for generating analog Hall signal of anti-clamping module of glass lifter

Country Status (1)

Country Link
CN (1) CN115263112B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102889039A (en) * 2012-10-15 2013-01-23 郭景华 Anti-pinch vehicle window system and method for calibrating anti-pinch force in real time
CN106193879A (en) * 2016-07-26 2016-12-07 深圳市金证卡尔电子有限公司 A kind of control device and method of the multi-functional anti-pinch of vehicle window Hall
WO2017047436A1 (en) * 2015-09-16 2017-03-23 株式会社東海理化電機製作所 Sensor structure and power window control device using same
CN106869670A (en) * 2017-03-23 2017-06-20 东莞雅音电子科技有限公司 Electric door detection means and detection control method
JP2018053603A (en) * 2016-09-29 2018-04-05 千蔵工業株式会社 Automatic door and control method thereof
CN111550144A (en) * 2020-04-29 2020-08-18 宁波芯路通讯科技有限公司 Anti-pinch control system and method for car window
CN112302464A (en) * 2020-10-30 2021-02-02 杭州创想智联科技有限公司 Method and device for controlling electric tail gate of automobile

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102889039A (en) * 2012-10-15 2013-01-23 郭景华 Anti-pinch vehicle window system and method for calibrating anti-pinch force in real time
WO2017047436A1 (en) * 2015-09-16 2017-03-23 株式会社東海理化電機製作所 Sensor structure and power window control device using same
CN106193879A (en) * 2016-07-26 2016-12-07 深圳市金证卡尔电子有限公司 A kind of control device and method of the multi-functional anti-pinch of vehicle window Hall
JP2018053603A (en) * 2016-09-29 2018-04-05 千蔵工業株式会社 Automatic door and control method thereof
CN106869670A (en) * 2017-03-23 2017-06-20 东莞雅音电子科技有限公司 Electric door detection means and detection control method
CN111550144A (en) * 2020-04-29 2020-08-18 宁波芯路通讯科技有限公司 Anti-pinch control system and method for car window
CN112302464A (en) * 2020-10-30 2021-02-02 杭州创想智联科技有限公司 Method and device for controlling electric tail gate of automobile

Also Published As

Publication number Publication date
CN115263112B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
CN106985954B (en) The regenerating control device of motor, the regenerative drives device of motor and electric auxiliary vehicle
KR102659048B1 (en) Hybrid vehicle and method of controlling mode transition
CN103946101B (en) Method and apparatus for determining to moor out track
CN103112453B (en) A kind of intelligent parking ancillary system
CN107089185B (en) A kind of analogy method of engine speed, device and electric car alarm control method
JP5810520B2 (en) Lane change control device and lane change stress evaluation method
CN105705963A (en) Object detection device and object detection system
CN101796427A (en) Object classification method, parking assistance method, and parking assistance system
KR20180070289A (en) Hybrid vehicle and method of controlling mode transition
CN103209858B (en) Electro-motive vehicle
CN109615903B (en) Parking space identification method
KR101014278B1 (en) Motorized assist bicycle
CN105774655B (en) One kind tilts parking stall detection device and method
CN102897058A (en) Slope-parking starting anti-sliding control method for pure electric motor coach
CN102923189A (en) Controller and control method for electric power steering system based on permanent magnet synchronous motor
CN105204028B (en) A kind of reversing ancillary hardware based on ultrasonic sensor is in ring development system
EP3812259A1 (en) Power assisted electric bicycle, transmission device and operation method
CN115263112A (en) Method and system for generating simulated Hall signal of anti-pinch module of glass lifter
CN102069728B (en) Power-assisted control method of electric bicycle
US7970525B2 (en) Method for determining the speed of a motor vehicle
CN112026767A (en) Method and system for processing error identification of guardrail by self-adaptive cruise and vehicle
CN115972915A (en) Energy recovery control method, energy recovery control device, vehicle, and storage medium
CN109947106B (en) Stable and reliable intelligent trolley capable of automatically avoiding obstacles and speed control method
US6941207B2 (en) Steering angular velocity detecting device
CN116215732B (en) Control method, device and system for pedal frequency assisted bicycle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant