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:
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.
[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 .
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.
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.
[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.
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.
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.
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.
Previous article:Comparison of several used microcontrollers
Next article:Software expansion method for multi-priority interrupts of single-chip microcomputers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- Is there a difference between the positive and negative sides of the 8*8 dot matrix? If the positive and negative sides are connected, will the pattern be reversed?
- Share a Huawei base station power amplifier from many years ago
- Prize-winning live broadcast: ST's PLC solutions in industrial automation. You are invited to watch at 10:00 am on May 26 (Wednesday)!
- ARM's IoT solution pocket book
- LTspice (10) .net files and sympy
- GW1N DS90C124 to SPI parallel-serial conversion for thermal imaging data acquisition
- [Environmental Expert's Smart Watch] Part 9: Activity Status Recognition
- USB DFU mode for ESP32-S2-Saola-1
- Does anyone know what chip the silkscreen 95360E is? I guess it is the 5V regulator?
- The Bluetooth headset is cracked, open it and take a look