Design of electromagnetic intelligent car based on fuzzy control

Publisher:GoldenEclipseLatest update time:2013-03-12 Source: 电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
0 Introduction
   
Smart cars cover multiple disciplines such as automatic control, pattern recognition, sensor technology, electronics, electrical, computer, machinery and automobile, and are very complex. Traditional control theory is powerless for complex or difficult to accurately describe systems. Fuzzy control uses fuzzy mathematics, which can effectively utilize expert knowledge and is applicable to many complex systems. Therefore, the design of electromagnetic smart cars based on fuzzy control is proposed.

1 System overall plan and various parameters of the car model
1.1 System overall plan
   
The smart car system consists of an electromagnetic sensor unit, a steering unit, and a steering mechanism on the front axle of the car, which are responsible for path detection and steering. The photoelectric encoder, motor, brake device and Freescale's MC9S12XS128 main control unit of the rear axle are responsible for motor speed control. The main control unit is responsible for track data processing and the implementation of control strategies. In addition, a wireless unit is added to monitor the real-time data of the smart car to optimize the fuzzy control rules. The structural relationship of the smart car system is shown in Figure 1:

a.JPG


1.2 System hardware parameters
   
The appearance parameters of the smart car are: 39cm long, 17cm wide, 13cm high, and weigh about 1.0kg.

2 Hardware circuit design
2.1 Design of the main control unit
   
The main control unit uses Freescale MC9S12XS128, with a main frequency of 40MHz, FlashRom128kB, and has common interfaces such as SPI, SCI, and IIC.
2.2 Selection and installation of photoelectric encoders
   
The higher the number of lines of the rotary encoder, the higher the speed measurement accuracy, but the larger the volume. Finally, the 200-line encoder E6A2-CS3E was selected. Installing the encoder on the rear wheel transmission gear can not only ensure its operating stability, but also reduce the center of gravity of the entire vehicle. Its specific installation is shown in Figure 3.

d.JPG[page]

2.3 Motor drive unit
   
The motor drive unit is composed of an H-bridge circuit. The H-bridge has the advantages of a large operating voltage range, small on-resistance, and large on-current. Its structure is shown in FIG4 .

e.JPG


2.4 Electromagnetic sensor circuit The
   
path guide wire of the electromagnetic smart car is an enameled wire (wire diameter 0.1-0.3mm) with a current of 20kHZ and 100mA. How to convert the electromagnetic wave energy generated by the guide wire into a voltage signal for AD sampling has become the most critical part of the smart car sensor. The road detection principle is shown in Figure 5.

f.JPG


    The intelligent car adopts a double row of eight inductors, with four inductors in each row, divided into two rows, front and back.

3 Design of control algorithm
3.1 Steering gear control algorithm
   
As the direction control structure of the car, the steering gear's control algorithm directly affects the overall quality of the car. If the steering gear's control algorithm is not good, it will cause the steering gear to turn smoothly, turn multiple times when turning, and greatly reduce the speed of the car when turning. Therefore, making the steering gear transition smoothly and timely is the main purpose of the steering gear control algorithm.
    The control of the steering gear adopts the classic PID control. The specific parameters of each link must be adjusted repeatedly to achieve a balance of adaptability to various types of tracks.
3.2 Motor speed fuzzy control algorithm
3.2.1 Fuzzy control
   
Fuzzy control is an intelligent control based on the experience of experts, and does not require an accurate mathematical model. The design of the fuzzy controller mainly considers the following main contents: 1) Determine the input variables and output variables (i.e., control quantity) of the fuzzy controller. 2) Design the control rules of the fuzzy controller. 3) Establish the method of fuzzification and defuzzification. 4) Select the domain of the input variables and output variables of the fuzzy controller, and determine the parameters of the fuzzy controller (such as quantization factor, proportional factor, etc.). 5) Compile the application program of the fuzzy control algorithm.
3.2.2 Design of fuzzy controller
   
The input of the speed controller is the angle and speed, and the output is the PWM wave duty cycle that controls the motor speed.
    The size of the smart car's turning angle is divided into 9 cases. As for the speed of the smart car, according to the conditions of the runway, it is divided into 8 cases between the minimum speed value of the turn and the maximum speed value on the straight road. Their fuzzification uses a triangular membership function, and the output membership function uses a single point value, as shown in Figure 6.

g.JPG

[page]

    According to the kinematic law of the vehicle body, in order to maximize the average speed of the vehicle and not deviate from the lane, the fuzzy control rules are summarized as follows:
    (1) If the smart car is on a straight road, the smart car is driving at a high speed, and the wire is in the middle of the smart car, then the smart car will drive at its highest speed.
    (2) If the smart car is about to enter a curve, it should slow down. If it has entered a curve, it should speed up so that it can accelerate faster when it exits the curve and enters the straight road.
    (3) If the smart car enters a curve at a high speed, it should brake to avoid running off the runway.
    Based on the above experience, the fuzzy control rules are shown in Table 1.

h.JPG


3.3 Overall flow chart of system control
   
The control software of the intelligent vehicle adopts a unitized program structure, and the flow chart is shown in Figure 7.

a.JPG



4 Debugging
   
During the debugging stage, a real-time monitoring system for the smart car was developed using Labview. The system mainly completes the real-time transmission of various status information of the smart car during driving (such as electromagnetic sensor value, vehicle speed, servo angle, battery power, etc.) to the host computer for processing via wireless serial communication, so as to facilitate timely adjustment of various parameters.

b.JPG



5 Conclusion
   
Through the application of fuzzy algorithm, the dynamic balance of the smart car is achieved, so that the smart car can complete the track well.

Reference address:Design of electromagnetic intelligent car based on fuzzy control

Previous article:Comparison of several used microcontrollers
Next article:Software expansion method for multi-priority interrupts of single-chip microcomputers

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号