收藏 分享(赏)

英文 ARM的Cortex微控制器模糊控制的自动定位试验台.doc

上传人:scg750829 文档编号:5554721 上传时间:2019-03-07 格式:DOC 页数:16 大小:1.11MB
下载 相关 举报
英文 ARM的Cortex微控制器模糊控制的自动定位试验台.doc_第1页
第1页 / 共16页
英文 ARM的Cortex微控制器模糊控制的自动定位试验台.doc_第2页
第2页 / 共16页
英文 ARM的Cortex微控制器模糊控制的自动定位试验台.doc_第3页
第3页 / 共16页
英文 ARM的Cortex微控制器模糊控制的自动定位试验台.doc_第4页
第4页 / 共16页
英文 ARM的Cortex微控制器模糊控制的自动定位试验台.doc_第5页
第5页 / 共16页
点击查看更多>>
资源描述

1、CHANGZHOU INSTITUTE OF TECHNOLOGY毕 业 设 计 说 明 书附 录: 英文资料翻译英文题目: Introduction to Modern Control Theory中文题目: 现代控制理论简介二级学院(直属学部): 延陵学院 专业:自动化 班级: 07 自 Y 学生姓名: 庞策 学号: 07121217 指导教师姓名: 关静 职称: 讲师 评阅教师姓名: 职称: 常州工学院 延陵学院2011 年 6 月ARM-Cortex Microcontroller fuzzy positionControl on an automatic door test-bedA

2、bstract This paper describes an application of a fuzzy logic 1 implementation on an ARM-Cortex microcontroller. The microcontroller with integrated fuzzy logic was tested on motor position and speed control application. Fuzzy logic is a subtype of multi-valued logic and can be used in combination wi

3、th other controller types (PI, PID, neural networks, genetic algorithms, etc.). The microcontroller is the core, or the “brains”, of the device. Complex devices include two or more microcontrollers that exchange data via various communication protocols. Each microcontroller has integrated software,

4、which represents the “mind” of the microcontroller. Without software, the microcontroller is just a useless electronic component. The software represents fuzzy logic, which controls the motor position in this application. The microcontrollers software is often written in the C programming language.

5、Expression often means that there are available more programming languages. Position control has a closed loop, meaning that the position of the motor is regulated to a reference position if the motor load is changing. The first goal of this application is to write a C language source code for a fuz

6、zy logic inference engine for the ARM Cortex M3 microcontroller. The second goal is to test this fuzzy logic inference engine on an automatic door for position control with combination of PI speed controller. The last goal is to analyze the automatic door behavior with fuzzy logic controller by vari

7、able door wing weight.I. INTRODUCTIONIn recent years, fuzzy control has spread to various macaronis devices that require operation control. The use of fuzzy logic is also gaining ground in home appliances and industrial machinery. The main advantage of fuzzy control is the robustness of various vers

8、ions of mechanism functionality (changes in inertia, friction, etc.). A PI and PID controllers are based on mathematical equations; these controllers become instable when mechanism functionality changes. The controller PI or PID output is calculated mathematically with parameters and process measure

9、ments. The controller task is to reduce process error. Fuzzy logic control can be configured by the user, and the controller progress of an output can be defined by rule bases and membership functions regarding of process measurement. The first half of the mechanical device position speed has to be

10、as fast as possible, for example. The second half of the mechanical device position speed has to be slower because of high inertia. The standard controller cannot provide this control method, while a fuzzy logic controller can. A similar problem occurs with the automatic door. The automatic translat

11、e doors have a similar problem because of various weight versions or variable bearings friction that increases in time. A door PI controller has to be set up after every door assembly, or when bearing friction increases. The fuzzy logic controller doesnt require a setup when the mechanism functional

12、ity changes. Automatic door movement can be more flexible with the fuzzy logic control.The fuzzy logic controller, work of Paul-l-Hay Lin et al. 6, has a resemblance to this application. Their work describes a comparison between a standard PID controller and the fuzzy logic controller on DC motor po

13、sition control. The controller is PC-based with analog I/O. The position of the DC motor rotor is defined with a position sensor via analog input. The DC motor power interface is controlled via PC analog output. The next work of Tips wan Y. and Mo-Yuen Chow 7 is fuzzy logic speed control of a DC mot

14、or. Their work is based on a 16-bit microcontroller with analog input control data from a tachometer, PWM output for motor control, and I/O for other controls (LCD, keyboard). A fuzzy logic speed controller simulation in MATLAB/Stimuli is the work of Montale O. et al. 8. Their work describes the dif

15、ference between PID and fuzzy speed control in simulations. A direct-drive robot with adaptive fuzzy disturbance estimation is the work of Rajkot, A. and Jeering, K. 9. Their work describes fuzzy controllers for adaptive adjustment, which improves dynamic changes. The controller algorithms are PC-ba

16、sed and communicate with the robot controller. The fuzzy speed controller is another similar work of Isis A. et al. 10, which is implemented on a PIC microcontroller. There are various decisions on how to implement a fuzzy logic in a microcontroller. Some companies offer software with an integrated

17、compiler for various microcontroller types, or independently write a fuzzy inference engine in common C programming language. The first option offers only a basic setup of fuzzy logic without the need for C programming knowledge in this software 2. The compiler software can be purchased for a price.

18、 In the second option, the fuzzy logic can be written by various users with knowledge of the C programming language. A motor position application (Fig. 1) with second option fuzzy logic on an ARM-Cortex microcontroller is described in this paper.H. Franc, R. Safari ARM-Cortex Microcontroller Fuzzy P

19、osition Control on an Automatic Door Test-BedII. TEST-BEDThe fuzzy logic controller software runs on the 32-bit LPC1768 microcontroller 5. The application is based on the MCB1700 demo board 4. The demo board is designed for various application experiments based on a microcontroller. Communications s

20、uch as USB, Ethernet, RS232, and CAN are already included on the demo board. General purpose input/outputs (IO) are included on the demo board for analog input (variable resistor), digital inputs (joystick), and digital outputs (Leeds). A prototyping area is intended for user-specific application de

21、signing, with which the user can use all general purpose pins on the microcontroller. A color LCD board is also included on the demo board. A programming software named Keel uVision4 3 was used for C programming and compiling. Kiel ulink2 4 was used for debugging and code transfer to the microcontro

22、ller. A controller loop (Fig. 2) consists of a speed PI controller and the position fuzzy controller. FigureA control board (Fig. 3) was developed for DC motor control. The DC motor control board consists of the MCB1700 demo board, an encoder input board (connection for speed/position sensor), an H-

23、bridge with DC-DC converters prototype board, and a 230VAC/30VDC power supply. The MCB1700 has an encoder input for position and speed measurement, CAN communication for process response data transfer to a personal computer, a microcontroller programming and debugging JTAG connection for the Ulink2

24、module, PWM and digital output for DC motor speed and direction control, as well as a 5V power supply. The Abridge prototype board supplies the MCB1700 board and controls the DC motor with PWM and direction data from the microcontroller.Figure 3: Prototype control boardThe last part of the test bed

25、is the automatic door mechanism (Fig. 4). The mechanism consists of a door wing with weight blocks, a linear guide, carts for door wing support, and a rotation-to-linear transformation mechanism.Figure 4: Test bed with automatic doorsIII. FUZZY LOGICThe fuzzy logic bears a similarity to human contro

26、l logic. It is a system that works on decisions of input process values. The fuzzy logic engine starts with a justification and membership functions. Each membership function can be configured in two different standard shapes in this application either a triangle or a trapezoidal shape (many more sh

27、apes can be used for fuzzy membership functions). The justification part transforms crisp input values to input fuzzy values (input membership function values). The triangle justification is defined with an equation (3.1) which calculates the crisp input value to the input fuzzy values.The values of

28、 points (I) n b , (I) n c , and (I) n d (Fig. 5) depend on the input range value n x . Point A is the maximum justification value of the membership function, which is standard value 1. The n x character is the crisp input value (analog input, encoder input, etc.). The (I) index presents the fuzzy in

29、put membership function number and the n index presents number of fuzzy input. The trapezoidal justification is defined by the following equation (3.2).The values of points (I) n b , (I)n c , (I)n d and (I)n e (Fig. 6) depend on the input range value. Point A is the maximum justification value of th

30、e membership function, which is standard value 1. The n x character is the crisp input value.An inference engine (Fig. 7) with a rule base transforms input fuzzy values (I) n u to inference values( , ) m z j R u dedicated by the rule base, where the index z is the output number, the index j represen

31、ts the output membership function number, and the index m represents the rule number. The rule base consists of represents the rule number. The rule base consists of IF THEN sentences, for example rule1: The logical operators AND OR are used for multiple fuzzy input values (I) n u comparison in rule

32、 base. The input fuzzy value (I) n u with lower value is accepted as rule based membership function when is used AND operator, and a highest input fuzzy value is accepted as rule based membership function when used OR operator.The rule-based membership function (Fig. 7) can have two or more rule-bas

33、ed output membership functions ( , )m z j R u , depending on the number of inputs and rule bases. The blue triangle rule-based membership functions 1 (1,1) R u ,4 (1,1) R u , and 6 (1,1) R u present the strength w(1,1) of output “1” and output membership function “1” (Fig. 8). The same holds true fo

34、r the yellow triangle rule-based membership functions2 (1,2) R u , 3 (1,2) R u , and 5 (1,2) R u , which present the strength w(1,2) of output “1” and membership function “2”. These rule-based membership functions have to be calculated to output membership function strength (Fig. 8). A root-sum-squa

35、re (3.3) (RSS) method is used in this application.The output membership function strength w( z, j) has two indexes. The index z presents the output number, whilej presents the output membership number.The defuzzification (Fig. 9) is the last part of fuzzy logic. The output membership function streng

36、ths have to be calculated to a crisp value one output value. The defuzzification implements several different methods to calculate output fuzzy value strengths to the crisp value. A centre of gravity (COG) method is used in this application.The centre of gravity equation (3.4) calculates the crisp v

37、alue from the output fuzzy membership function mean value ( z, j ) M y (Fig. 10) and the output fuzzy membership function strength w( z, j ) .The triangle membership function (Fig. 5) with points (I) n b , (I) n c , and (I) n d for example has (I) n c point center. The fuzzy output crisp value can b

38、e used for various data methods (digital to analog conservation, speed set, etc.)Figure 9: Defuzzification block diagramIV. FUZZY LOGIC IMPLEMENTATIONThe fuzzy logics program code supports up to eight inputs and four outputs. Each input and output supports up to eight membership functions with two d

39、ifferent membership function shapes. Implementation requires some basic C programming with basic array knowledge. Programming with arrays reduces the amount of code and provides a simple fuzzy controller initialization. The microcontrollers quadrate encoder input, direction digital output, and PWM o

40、utput are used in this application. A sensor for position and speed measurement is connected to the microcontrollers quadrate encoder input. The PWM and direction output is used for the Abridge that controls the DC motor. The H-bridge consists of four MOSFET transistors and a controller chip. The co

41、ntroller chip controls the H-bridge operation with the microcontrollers PWM and direction data. The direction output defines the motor rotation (forward or reverse) and the PWM output defines the motor speed (voltage control of the DC motor).The fuzzy logic controller is used for position control. T

42、wo fuzzy controller inputs are used for the position error, and the position error change. The actual position as is calculated from the microcontrollers quadrate encoder periphery. The microcontroller periphery calculates data from position/speed sensor. A position error p e is calculated (4.1) fro

43、m the desired positions and the actual position as . The desired position can be changed via the microcontrollers programming software terminal u Vision installed on the personal computer.The fuzzy controller has a second input that represents the position error change . The position error change is

44、 calculated (4.2) from actual position error p(k ) e and the previous position error .The fuzzy inference engine (Fig. 11) was developed in the programming language for the ARM microcontroller. The first part of the inference engine presents the definitions of fuzzy membership functions, fuzzy input

45、/output range definitions, and rule base initialization.The second part of the inference engine includes the fuzzification method with two different justification forms. The triangle or trapezoidal fuzzification form source code is calculated with the equation (3.1) or (3.2), which transforms the po

46、sition error and change of position error to fuzzy values.The third part is a rule-based comparison, which compares between two or, at maximum, three different fuzzification inputs. Only two fuzzification inputs are compared in this application (position error and position error change). A result re

47、cording is the last part of the rule based comparison, which saves rule based comparison results in an array variable. The arrangement of input fuzzification comparison results is needed because of unsorted results in the array variable. The results have to be sorted by the fuzzy output number and t

48、he fuzzy output membership function.A result sorting source code solves this problem and is the fourth part of the fuzzy inference engine.The root-sum-square equation source code calculates the strength of each fuzzy output membership function from rule-based comparison results. The root-sum-square

49、equation source code is the fifth part of the fuzzy inference engine.The fuzzy output membership functions mean calculations have to be completed before the last part of the fuzzy inference engine. The mean calculation source code calculates a mean line (Fig. 10) of the output membership function.A defuzzification source code is the last part of the fuzzy inference engine. The defuzzification source code calculates the crisp output from the output membership function strength, and the output memb. funct. Mean calcu

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 通信信息 > 电子电气自动化

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报