After all, the problem that the car control algorithm needs to solve is: input -> control model -> output control parameters.
2 WJ's own thoughts on the use of neural networks for car control.
(1) Do not expect the real-time performance of neural networks. The most time-consuming part of neural networks is training. The neural network only needs one or two successful trainings when the car is running. When the car is running in a straight line, the data is used for training, because the CPU will have idle time when the car is running in a straight line. In addition, I believe that everyone often uses the DIP switch to select multiple control decisions. This is also a method. However, this control decision is fixed and pre-planned, and it will definitely not adapt to the various paths of the new KT board.
(2) It is best to use the on-chip FLASH or SD card. Data processing is very important and data is also very valuable. Save the data and transfer it to the PC. When the data is OFFLINE, study the algorithm of the neural network (there are countless training algorithms). This is one of them. Secondly, the trained network is stored in the SD card. If you need to train again next time, you can start from the old network (generally the network weights start randomly), which will be much more efficient.
(3) Just like data fusion, there is the fusion of the decision layer and the data layer, and the same is true for neural networks, with the use of the decision layer and the data layer. Since the path of the car is continuous, the neural network of the data layer is definitely useful. In image acquisition, it is generally 40ms to collect the path and make a control decision. So what should we do if this 40ms time is not enough? A common method is to simply collect it once every 80ms. My suggestion is to collect an image once in the first 60ms and make a control decision. In the next 20ms, use the path information extracted in the first 40ms and use the neural network to predict the change of the path. In this way, it is equivalent to collecting an image once in 20ms. As you can imagine, the efficiency is improved.
(4) The above is the use of neural networks from the data layer. Here we will talk about the use of neural networks from the decision layer. For example, if the controller outputs -3 -2 -1 0 1 2 3 represent the servo left deviation 30, left deviation 20, left deviation 10, straight, right deviation 10, right deviation 20, right deviation 30, and the car's first 7 control decisions are: straight, right deviation 10, straight, left deviation 10, straight, right deviation 10, straight, (0 1 0 -1 0 1 0). . . . , then the 8th decision through the Neural Network should be left deviation (-1). If the actual requirement is not left deviation, the Neural Network should be "punished".
(5) Find a suitable error threshold. The car's tracking is not like laser cutting, and the accuracy requirement is not high. The error value of its training can be "negotiated". (6
) The training data of the Neural Network cannot be captured by just one, but must be selected. But this selection is also time-consuming. If it is on a PC, FCM (fuzzy clustering) is a good choice. However, MCU cannot bear this heavy responsibility, so choosing appropriate training data and target data is also an important research topic. Here, how to optimize the neural network input is not the focus, so it is skipped.
(7) Pay attention to normalization processing and neural network training algorithm. These two points are very important. Normalization can be understood as normalizing (100 45 -67 90) to (1 0.45 -0.67 0.9). The advantage is to improve the standardization of data and accelerate convergence. In addition, the importance of training algorithm is self-evident. For example, the gradient descent method is used to minimize the error. What is the gradient descent method? For example, if you want to go down the mountain, the slope in front of the mountain is 30 degrees, and the slope behind the mountain is 90 degrees. If you want to go down the mountain quickly, of course you should find a steep slope and jump directly. This downhill slope and training gradient have the same meaning.
(8) I personally think that using neural network for speed control has great advantages. Compared with PID control, the accuracy may be a little defective, but the speed is fast. Due to friction, car power performance, car drive performance, battery and other reasons, closed-loop speed control is required. Suppose: the car has a beat of 10ms per unit time, and the speed goes from X1m/s->Y1m/s, which requires a PWM duty cycle of d1%; the speed goes from X2m/s->Y2m/s, which requires a PWM duty cycle of d2%... The speed goes from Xn m/s->Yn m/s, which requires a PWM duty cycle of dn%. Then, with (X, Y)' as the training input and (D)' as the training output, a neural network is established and trained, and it is very easy to establish the relationship between PWM and speed control.
Previous article:Problems with using _at_ absolute address positioning in Keil
Next article:Some thoughts on HCS12 ECT module
Recommended Content
Latest Microcontroller Articles
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- 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
MoreDaily News
- 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!
- 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
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
Guess you like
- FAQ_How to calculate the response time from shutdown state to READY state
- [NXP Rapid IoT Review] Low Power Consumption Experiment & Summary
- There is something wrong with the program, please solve it
- What does the data check code mean? Can someone explain it to me?
- Supercapacitor constant power charging and voltage regulation
- EEWORLD University ---- Big Data Machine Learning (Yuan Chun)
- Boss, what's your home WIFI password? ——Qorvo~Wi-Fi 6
- When BLE meets MEMS——attitude calculation
- Lazy voice-controlled lamp based on Gizwits Cloud
- 【NXP Rapid IoT Review】+ Review Summary