AVR191: Anti Pinch Algorithm for AVR
Adaptation Procedure
Introduction
The pu rpose of this docum ent is to expla in how to adapt an anti -pin ch algo rithm to a
specified powered window. This algorithm is described in AVR480 application note
which can be foun d on Atmel website . Algorith m is adapti ve, but so me paramet ers
have to be man ually se t. Thi s applic ation no te desc ribes how mot or, mecha nical an d
electrical paramete rs have to be set to allow correct func tion of the anti-pinch algo-
rithm descirbed in AVR480.
Algorithm
overview
Anti-pinching systems are specified by standards which describe pinching effort and
pinch ing detect ion areas. O ther constr aints are taken in to accoun t, as descri bed in
anti-pinch application note AVR480.
Anti-pi nch al goritm is able t o adapt i tself to v arious fr iction v alues than ks to curren t
measurments and derivative speed computation. Both values lead to determine a cur-
rent reference.
Robustness has been included in algorithm through current average and blocki ng
point detection.
Pinching conditions are detected using a comparison between current reference and
pinch threshold compos ed of a constant and of a permanently computed blocking
point information. Porting algorithm from a window lift to another requires to adapt this
pinc h threshold. This requires:
Mechnical paremeters knowledge.
DC motor parameters knowledge.
Acquisition chain knowledge.
Standards
Configuration
All parameters allow to configure the algorithm. It can be considered as a database,
updatable to several opening aparatus.
They can be set up in non-volatile memroy (using MCU EEPROM) as well as in
source code before compilation (using a definition file).
7678A–AUTO–11/06
Automotive
Microcontrollers
Application Note
2
7678A–AUTO–11/06
AVR191
Required parameters Anti-pinch application note AVR480 describes a window lift model. This section
describes which parameters shall be updated when porting the algorithm.
Mechanical parameters
Figure 1. Powered Window Mechanical Components
For the algorithm to work on the window lift, the following parameters have to be known:
r: The roller cable radius
n: The reducer ra tio
Window height: the movement magnitude of the window moving part
Rubber joint deep: (In order to inhibit anti-pinch into the upper part of the rubber
joint)
The anti -pin ch al gorit hm i s ada pti ve to var i ous fr i ctions a nd t he a dap tati on r o utin e (ex e-
cuted to i nitial ize the wi ndow-l ift) will ident ify and store bl ocki ng poin ts and n on-line arity
magnitude.
DC Mot or parameters A second order motor model has been chosen to implement the anti-pinch algorithm.
Figure 2. Second order motor model
You need to know or to determine motor torque constant K. Other parameters may also
be use ful to d etermin e it, but a re not required by al gorithm ( See app endix
5.2 “Motor
Identific ati on examp le”).
M
Motor
Endless screw
« Fl e x i bl e »
coupling
Non-linearity
Roller for cable
cable + sheath
slides
Pulle
y
Cable window fixa tion
LpR +
1
K
Jpf +
1
K
+
U
I
C
em
Ω
E