avr191 anti pinch algorithm for avr adaptation procedure_第1页
avr191 anti pinch algorithm for avr adaptation procedure_第2页
avr191 anti pinch algorithm for avr adaptation procedure_第3页
avr191 anti pinch algorithm for avr adaptation procedure_第4页
avr191 anti pinch algorithm for avr adaptation procedure_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、AutomotiveMicrocontrollersApplication Note7678AAUTO11/06AVR191: Anti Pinch Algorithm for AVR Adaptation ProcedureIntroductionThe purpose of this document is to explain how to adapt an anti-pinch algorithm to a specified powered window. This algorithm is described in AVR480 application note which can

2、 be found on Atmel website. Algorithm is adaptive, but some parameters have to be manually set. This application note describes how motor, mechanical and electrical parameters have to be set to allow correct function of the anti-pinch algo- rithm descirbed in AVR480.Algorithm overviewAnti-pinching s

3、ystems are specified by standards which describe pinching effort and pinching detection areas. Other constraints are taken into account, as described in anti-pinch application note AVR480.Anti-pinch algoritm is able to adapt itself to various friction values thanks to current measurments and derivat

4、ive speed computation. Both values lead to determine a cur- rent reference.Robustness has been included in algorithm through current average and blocking point detection.Pinching conditions are detected using a comparison between current reference and pinch threshold composed of a constant and of a

5、permanently computed blocking point information. Porting algorithm from a window lift to another requires to adapt this pinch threshold. This requires: Mechnical paremeters knowledge. DC motor parameters knowledge. Acquisition chain knowledge. StandardsConfigurationAll parameters allow to configure

6、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). Required parametersAnti-pinch application note AVR480 describes a window lift

7、model. This section describes which parameters shall be updated when porting the algorithm.Mechanical parametersFigure 1. Powered Window Mechanical ComponentsMCable window fixationPulleyslidescable + sheathRoller for cable Flexible coupling Non-linearityEndless screwMotorFor the algorithm to work on

8、 the window lift, the following parameters have to be known: r: The roller cable radius n: The reducer ratio Window height: the movement magnitude of the window moving part Rubber joint deep: (In order to inhibit anti-pinch into the upper part ofthe rubber joint)The anti-pinch algorithm is adaptive

9、to various frictions and the adaptation routine (exe- cuted to initialize the window-lift) will identify and store blocking points and non-linearity magnitude.DC Motor parametersA second order motor model has been chosen to implement the anti-pinch algorithm.+ I Cem-EK 1f + Jp 1R + LpFigure 2. Secon

10、d order motor modelKU You need to know or to determine motor torque constant K. Other parameters may also be useful to determine it, but are not required by algorithm (See appendix 5.2 “Motor Identification example”).2AVR1917678AAUTO11/06AVR191Acquisition chainThe algorithm requires motor current ac

11、quisition. Acquisition chain has to be identified.I motor+ -ADCFigure 3. Global Acquisition chain (from current value to ADC register value)ShuntThe global acquisition chain gain has to be determined to obtain:ADCIGacq = - ADC = Gacq Imotormotor97678AAUTO11/06Parameters from standardsFollowing param

12、eters are extracted from standards: Pinch threshold: In addition, the user will have to parameter the pinch threshold value in Newton. This value shall be less than 100N according to standards. Higher position: Correspond to rubber joints deep + 4mm (All positions are referenced from the top of the

13、window lift). Pinch conditions are not checked above this position Lower position: Pinch conditions are not checked under this position (typical is 200mm from the top of the window)Parameters summaryr: The roller cable radius n: The reducer ratio Window height: the movement magnitude of the window m

14、oving part. Rubber joint deep: (In order to inhibit anti-pinch into rubber joint) K: Motor torque constant Gain Acq: from Acquisition chain Pinch threshold Higher position Lower positionComputing ParametersGainThe algorithm computes a current reference (multilied by GainAcq factor). To detect a pinc

15、h, it compares: ADC acquired value to reference + Pinch value.Pinch value has to be in range with ADC values. ADC represents a measured current. Pinch has to represent also a current value. So, we have:Cem= K I F Cr Ipinch= -r-pinch pinch= - Fpinchn Knwhere Fpinch is the pinch threshold value. Using

16、 acquisition gain,The global gain is defined:ADC = Imotor GainAcqPinch= Ipinch Gacqr Gacqr GacqGain = -Pinch= - Fpinch n Kn KPinch value is in range with ADC values and directly represents the force applied to the window lift thanks to Gain value, provided by user.Other parametersNumber of hall sens

17、ors used shall be defined. Indeed, operating direction can be mea- sured when using two hall sensors, which provides more positionning precision. When only one hall sensor is used, command direction is used to compute position.Parameters from standards:Pinch threshold: It could be determined by stat

18、istic methods using repetitive pinch measurements. It must provide a satisfying probability not to have pinches greater than 100N.Upper glass position and Lower position to detect a pinch: Those values shall be filled in millimeters. Algorithm will convert it then, depending on hall position sensor

19、and multi-pole magnetic ring resolution, thanks to adaptation routine. (All positions are refer- enced from the top of the window lift).Some parameters are automatically filled by adaptation routine. Those could be found in Appendix “5.1 Anti-pinch Parameters storage”Setup parametersUsing HMIPreviou

20、sly determined parameters can be stored to EEPROM, to be used as a database by anti-pinch algorithm. It has to be stored with the right format, as described in appen- dix “5.1 Anti-pinch Parameters storage”.For this, executing HMI is very useful. Parameters entered are computed and can be correctly

21、formatted. A hexa file is generated and is directly storable to EEPROM (using AVR studio).Figure 4. Anti-pinch parameters adaptation HMISource code setupAll those parameters can be set up in source code as default values. They are all defined in window_lib.h. Those will be used in case of EEPROM has

22、 never been initial- ized and is filled with 0xFF.The Number of hall effect sensors shall also be defined in config.h configuration file.Parameters Updated by adaptation routineIn addition to blocking points detection, some parameters are acquired at initialization time by adaptation routine: Hall e

23、ffect sensor resolution Top and bottom positions BacklashA first complete downward, then upward operation allow to count the number of hall effect sensor pulses for a complete operation. It is stored in EEPROM as “down” value (see Appendix “5.1 Anti-pinch Parameters storage”). Its used to determine

24、the resolu- tion and to calibrate the anti-pinch algorithm working areas.In a second time, adaptation routine operates window-lift downward, into pinch detection area (between 4mm and 20mm from top). It reverses direction upward and monitors pinch condition to measure backlash (used in startup phase

25、 of the window lift state machine (see application note). Indeed, start current is seen like a pinch: adaptation routine stores the number of hall sensor pulses to inhibit anti-pinch at motor startup (see Appendix “5.1 Anti-pinch Parameters storage”).AppendixAnti-pinch Parameters storageAnti-pinch p

26、arameters are stored, retrieved and refreshed in a table.Table 1. Stored parameters to non volatile memory (eeprom)DescriptionOffsetCommentsUpdated by adaptation routinePosition lsb0Window-lift positionYes (and by application)Position msb1Last Direction2Last operating directionYes (and by applicatio

27、n)Pinch threshold3Pinch threshold valueNo, Filled by userGain4see “3.1 Gain”No, Filled by userWindow height lsb5Window height (mm)No, Filled by userWindow height msb6Higher position7Distance from top (to inactivate anti-pinch)No, Filled by userLower position lsb8Distance from top (to activate anti p

28、inch)No, Filled by userLower position msb9Down lsb10Distance from top to bottom (number of measured hall sensor pulses)YesDown msb11Backlash lsb12Measured non-linearity when starting up operation, as last operation was a downwardYesBacklash msb13-Blocking point nbr15Registred blocking point numberYe

29、s, and by applicationBlocking points16201st registered blocking pointYes, and by application“21252nd registered blocking pointYes, and by application“26303rd registered blocking pointYes, and by application“31354th registered blocking pointYes, and by application“36405th registered blocking pointYes

30、, and by application“41456th registered blocking pointYes, and by application“46507th registered blocking pointYes, and by application“51558th registered blocking pointYes, and by application“Motor Identification exampleTo determine the following parameters, several tests are ran, the motor being di

31、scon- nected from the window-lift. Carried out tests lead us to obtain: R: Equivalent resistor of the armature L: Equivalent self-inductance of the armature f: Viscous frictions J: inertia K: Torque constant (Kt) and speed constant (Ke), et K = Ke = Kt.To determine R, the motor is supplied so that i

32、t doesnt start (to have the back induced electromotive force E = f (rotation speed) = 0). So we measure:R = U I = 1,1V 0,7A = 1,43Then, the motor is supplied under nominal voltage level (Uo = 12V) to deduce perma- nent operation: Io = 1.2A, No = 4000 revolutions/min (rpm).K = Ke = U o - RI ow= 12 -

33、1 .43 * 1 .22 P * 4000 60= 0 .0245 V .s / radK * I0 .0254 * 1 .2 = 65 .4 * 10 - 6 Nmsf = o = w o2p * 4000 60The speed step response is analysed (to obtain mechanical parameters):Uo=12VNoInput : u (V) Output : N (rpm)mFigure 5. Motor step response analysis (nominal voltage)tWe obtain:Km = w o = 4000

34、* 2p = 34 .9 rad / sU o12 * 60Vtm = 44msand:Km =K=0.0245=K + R * f0.0245 + 1.43 * 65.4 *10 -6We are able to determine:34 .9rad / s VJ = t m * K = 0.044 * 0.0245 = 19 .1*10 -6 Kg .m / s R1.43To determine L, the motor is supplied with a low voltage level square signal so that the motor cant start. Tha

35、t allows to determine the electrical time constant. We measure cur- rent with a shunt resistor.Figure 6. Electrical time constant measurementUo=1,1ViInput : u (V) Output : ie=L/RtMotor parameters can be determined as in the following script example./Script: DC motor model:/ Measured values /Uo=12; /

36、 Volt Io=1.1;/ Amp N=4000;/ tr/min R=1.43/ OhmsTau_m=44e-3;/ Mechanical constant (Seconds) Tau_elec=0.5e-3; / Electrical constant (Seconds)/ wo=N*2*%pi/60;K = (Uo-R*Io)/wo/ electromotive force constant/ Remark: We have chosen K=Ke=Kt (KE is the motor electromotive force constant, and Kt is the motor

37、 torque constant.f= K*Io/wo/ Using a first order model: Ks = K/(K2+R*f)Km= wo/ Uo/ (rad/s)/V = Ks J=Tau_m*K2/RL=Tau_elec*RAtmel CorporationAtmel Operations2325 Orchard Parkway San Jose, CA 95131, USA Tel: 1(408) 441-0311Fax: 1(408) 487-2600Regional HeadquartersEuropeAtmel SarlRoute des Arsenaux 41 C

38、ase Postale 80CH-1705 Fribourg SwitzerlandTel: (41) 26-426-5555Fax: (41) 26-426-5500AsiaRoom 1219Chinachem Golden Plaza 77 Mody Road Tsimshatsui East KowloonHong KongTel: (852) 2721-9778Fax: (852) 2722-1369Japan9F, Tonetsu Shinkawa Bldg. 1-24-8 ShinkawaChuo-ku, Tokyo 104-0033 JapanTel: (81) 3-3523-3

39、551Fax: (81) 3-3523-7581Memory2325 Orchard Parkway San Jose, CA 95131, USA Tel: 1(408) 441-0311Fax: 1(408) 436-4314Microcontrollers2325 Orchard Parkway San Jose, CA 95131, USA Tel: 1(408) 441-0311Fax: 1(408) 436-4314La Chantrerie BP 7060244306 Nantes Cedex 3, FranceTel: (33) 2-40-18-18-18Fax: (33) 2

40、-40-18-19-60ASIC/ASSP/Smart CardsZone Industrielle13106 Rousset Cedex, France Tel: (33) 4-42-53-60-00Fax: (33) 4-42-53-60-011150 East Cheyenne Mtn. Blvd. Colorado Springs, CO 80906, USA Tel: 1(719) 576-3300Fax: 1(719) 540-1759Scottish Enterprise Technology Park Maxwell BuildingEast Kilbride G75 0QR,

41、 Scotland Tel: (44) 1355-803-000Fax: (44) 1355-242-743RF/AutomotiveTheresienstrasse 2Postfach 353574025 Heilbronn, GermanyTel: (49) 71-31-67-0Fax: (49) 71-31-67-23401150 East Cheyenne Mtn. Blvd. Colorado Springs, CO 80906, USA Tel: 1(719) 576-3300Fax: 1(719) 540-1759Biometrics/Imaging/Hi-Rel MPU/ Hi

42、gh Speed Converters/RF DatacomAvenue de Rochepleine BP 12338521 Saint-Egreve Cedex, France Tel: (33) 4-76-58-30-00Fax: (33) 4-76-58-34-80Literature R/literatureDisclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMELS TERMS AND CONDI- TIONS OF SALE LOCATED ON ATMELS WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论