The Freescale 16-bit single-chip MC9S12XS128 is used as the core controller, and the two-wheeled toy car is used as the control object. The ENC-03RC gyro sensor and the MMA7361 acceleration sensor are used to measure the tilt angle of the two-wheeled toy model by using the matching filter algorithm. On this basis, the vertical motion of the two-wheeled toy car is linearly decomposed, and an upright speed controller is designed. Realized the two-wheeled vehicle upright operation. Since the beginning of the 21st century, with the rapid development of China's urban and rural economy and the improvement of people's living standards, more and more people have begun to own private cars, which has caused increasingly serious traffic pressure to a certain extent. In order to solve this problem, people began to study new vehicles. Compared with vehicles such as tricycles and four-wheelers, the two-wheeled vehicle has the characteristics of being easy to operate in a narrow space, light and flexible body and easy to store and manage. It has become a research hotspot in recent years and has broad application prospects. In view of this, this article takes toy car model (hereinafter referred to as car model) as the research object, based on the advanced SMT technology of modern circuit electronics, and uses advanced control theory to conduct in-depth research on two-wheeled vehicles. The MC9S12XS128 is a cost-effective 16-bit microcontroller from Freescale Semiconductor. The ENC-03RC sensor for measuring angular velocity produced by Murata Co., Ltd. is inexpensive, and the angle measurement can be realized with the three-axis angle measuring sensor MMA7361. In this paper, MC9S12XS128 is used as the core controller, and ENC-03RC and MMA7361 are the main sensors. The advanced PID algorithm is used to design the vertical speed controller to realize the vertical operation of the vehicle model. 1.1 Measurement of the inclination angle of the model Through the study of the inverted pendulum, it can be found that to achieve the upright control of the car model, it is necessary to overcome the gravity effect of the car model. To do this, you must obtain the angle at which the car is tilted and the angular velocity. In this way, when the car model is tilted backward, the car model motor is controlled to accelerate backward by the obtained angle and angular velocity. When the car model is tilted forward, the value of the angle and the angular acceleration is used to accelerate the motor forward, thereby keeping the car model standing upright at the balance point. The angle sensor MMA7361 can be used alone to measure the tilt angle, and then the angular velocity can be obtained by differentiation, but it is not suitable for upright control because of its noise. Based on this, this paper combines two kinds of sensors and uses the matched filtering algorithm to measure the angle and angular velocity. The block diagram of the matched filtering algorithm is shown in Figure 1. 1.2 Upright control of the car model It can be seen from Fig. 1.1 that the angle of the vehicle model is smoothed by the matched filtering algorithm, and the value of the angular acceleration is obtained by the gyro sensor. The upright control of the car model is controlled by angle negative feedback, enabling it to achieve upright control. With proportional control, you can control the car model to stand upright at the balance point. However, it is necessary to ensure that the car mold has strong anti-interference and has a fast response speed, that is, when the car model encounters interference, it can quickly stabilize to the equilibrium point, and also needs differential control, that is, the angular acceleration of the car model is added. In this way, the use of the angle ratio and the differential control can achieve a rapid stabilization of the car model at the equilibrium point (the actual model of the car model to be drawn). The schematic diagram of the upright control is shown in Figure 2. 1.3 Speed ​​control of the car model In order to solve the gyro sensor temperature drift and sensor installation problems, the balance point of the car model can be stabilized by adding speed control. Controlling the uprightness of the car model through the angle of the car model is a positive feedback process rather than negative feedback, which is different from other common control methods. The root cause is that the direction of gravity of the car model is opposite to the direction of the force returning to the equilibrium point. When the car model is quickly tilted in one direction, in order to change the direction of motion, that is, change the tilt angle of the car model, positive feedback should be applied to increase the force of the motor and change the tilt angle of the car instead of reducing the motor control. So speed feedback is a positive feedback. Since the actuator of the car model is a DC motor, the motor is upright and speed controlled by controlling the motor. The drag of the motor can be used to know that the relationship between the torque and the current generated by the DC motor is approximately T=CeφIa (1) Where Ce is the motor constant, φ is the potential constant, and Ia is the armature current. From equation (1), the motor can be considered as a linear mechanism. Such upright control and speed control can be seen as two controllers linearly superimposed together and can be approximated as being uncoupled. At this time, the speed controller can be designed separately from the stand-up control. The speed control uses a modified PI controller. Figure 3 shows the block diagram of the speed control: The key to the upright operation of the car model is upright control and speed control, which can be realized based on gyroscopes and accelerometers and speed sensors. The block diagram of the whole system is shown in Figure 4. Rotor aluminum centrifugal casting is the way usually process with large sized rotors for motors. Centrifugal casting compare to die casting, centrifugal casting has more stable quality with conduct bars and end rings. And it also a more economic way compare to copper rotors, becasue the aluminum is much cheaper than copper. Rotor Core By Aluminum Centrifugal Casting,Laminated Rotor Core,Motor Rotor Core,Rotor Stator Core Henan Yongrong Power Technology Co., Ltd , https://www.hnyongrongglobal.com