Design of Brushless DC Motor Controller for Vehicle Based on LIN Bus

1 Introduction With the electrification and automation of automotive components and the high requirements for noise, electromagnetic compatibility and efficiency of automotive motors, permanent magnet brushless DC motors are gradually replacing brushed permanent magnet DC motors. The permanent magnet brushless motor has the advantages of small size, long life, high efficiency, simple structure and good reliability, and can be used as a driving actuator of an automobile component to effectively improve the performance of the automobile component. For example, in the Freightliner's M2 series commercial vehicle, the air blower is driven by a brushless motor to better adjust the air supply speed.

This article refers to the address: http://

Due to the maturity of automotive bus technology, the control methods of multiple motor units in automobiles are changing from traditional centralized harness control to distributed bus control. Distributed bus control can reduce the wiring harness and reduce the cost. It is convenient for each motor control unit and other electronic control units in the vehicle to form a comprehensive and coordinated control system, improve the operational reliability of each control unit, and reduce redundant sensors and corresponding soft. Hardware configuration for information exchange and resource sharing. Currently used car buses include CAN, LIN, etc., of which LIN is aimed at low-speed applications. The author designs a brushless DC motor controller based on LIN bus. The controller is composed of MC68HC908MR16 MCU, PC33896 pre-driver and MC33399LIN transceiver as described in the literature. It achieves better control performance at low cost.

2 Brushless DC motor control system based on LIN bus?

The LIN bus is a new type of low-cost car body bus. It was launched in 1999 by the European associations of automobile manufacturers Audi, BMW, Daimler2Chrysler, Volvo, Volkswagen, VCT and semiconductor manufacturer Motorola. It has been in operation since 2003. .

The LIN bus uses a serial communication protocol, which has the following features: single-master multi-slave organization (ie, no bus arbitration); low-cost hardware implementation based on common UART/SCI interface, low-cost software or as a pure state machine; slave Nodes do not require quartz or ceramic resonators to achieve self-synchronization; to ensure signal transmission delay time; low-cost single-wire communication medium, communication rate up to 20kb / s. A LIN network consists of 1 master node and no more than 15 slave nodes. All nodes have a slave task, the slave task is divided into receiving tasks and sending tasks, and the master node also has a host task. The communication on the LIN network is always initiated by the host task. The host task transmits the message frame header. The message frame header includes the synchronization interval field, the synchronization field and the flag field. The slave task responds to the message response, and the message response includes 2 The 4 or 8 byte data field and the check field, the message frame header and the message response form a complete message frame.

The LIN bus is used as a supplement to the CAN bus and is mainly used for body control. The body network is mainly connected to the system of seats, doors, air conditioners and instrument displays. The block diagram of the fully automatic air conditioning system based on LIN bus is shown in Figure 1. The central control unit of the air conditioner functions as the CAN/LIN gateway and the LIN master node, and the other units are slave nodes, which are divided into sensor slave nodes and execution slave nodes. The sensor slave node transmits environmental state values ​​such as temperature, humidity, and sunshine intensity to the master node, and the master node performs comprehensive decision according to parameters such as the state value and the interior temperature set by the driver, and transmits a control command to the execution slave node to execute the slave command. The node performs the corresponding action according to the command. Such an air conditioning system effectively realizes distributed control of nodes, reduces the installation of wiring harnesses on the vehicle, and realizes true automatic control, so that the components of the air conditioning system operate in coordination, so that the indoor temperature reaches and maintains the driver set value. Create a comfortable indoor environment. Since the brushless DC motor has good speed regulation performance, some of the execution nodes in the air conditioning system use it as a driving component such as a compressor, a blower, a cooling fan, and the like. The slave nodes and the master node form a closed-loop control of the brushless DC motor speed based on the LIN bus. The master node gives the motor speed through the decision algorithm. The feedback and control algorithm of the speed is completed by the slave node. The slave node is the author. The controller to be designed.

 

3 controller hardware structure

The block diagram of the controller is shown in Figure 2. The figure includes: power management module, MC68HC908MR16 microcontroller control module, PC33896 pre-driver module, three-phase FET full-bridge module, MC33399LIN physical layer communication module.

The Hall sensor detects the position of the rotor of the motor. It is a signal with three pulse widths of 180° (electrical angle) and 120° (electrical angle). The timer input capture unit of the single chip captures the change of the position signal, realizes the commutation of the stator winding current, and ensures that the magnetic field generated by the stator maintains an average vertical relationship with the permanent magnet magnetic field of the rotor, so as to generate maximum torque. At the same time, the speed of the motor can be calculated by the time interval between the two commutations recorded by the timer, and the PWM duty ratio is adjusted by the PI algorithm according to the difference between the target speed and the calculated speed, thereby controlling the rotational speed of the motor. The motor's target speed, start/stop, forward/reverse information, etc. are from the message frame of the LIN bus.

3.1 Power Management Module

The electrical load inside the modern car is increasing, and the 42V electric system will be replaced by the existing 12V electric system in the future. However, to fully realize this change, there are still many problems that have not yet been solved. The dual-supply power supply of 42V / 12V is mainly used as a transitional solution. The controller designed by the author considers this trend. In 12V motor applications, the controller is powered by a single 12V supply; in a 42V motor application, the controller is powered by a 42V / 12V dual supply. At the same time, the power management module contains a 12V /5V power regulator chip LT1211.

3.1 MCU control module

The MCU control module is based on the MC68HC908MR16 MCU. It is an 8-bit MCU specially designed for motor control. The working temperature range is -40 ~ 105 °C, fully adapted to the working environment inside the car. On-chip with 12-bit, 6-channel PWM module, generates 6 PWM logic signals (can be set to 6 independent or 3 pairs of two complementary); timer A's 0, 1, 2 three channels are used to capture the position The change of the sensor signal, channel 3 is responsible for recording the moment when the position signal of channel 2 changes; the 10-bit A / D converter, the conversion time is 16 - 17μs, can quickly complete the battery voltage monitoring task; the error signal input is used to occur in Overcurrent or overheating generates an interrupt, which in turn blocks the PWM output; the unique fast 8-bit multiply and 16-bit divide instructions make it more computationally capable of performing more complex control algorithms; 768B on-chip RAM and 16kB On-chip flash memory with in-circuit programming and security features; system protection features, including watchdog reset, low voltage disable reset, etc. enhance program stability and reliability.

3.3 front drive module

At the heart of the front-drive module is the PC33896, a new three-phase FET pre-driver for automotive electronics 42V / 12V systems. The chip contains DC / DC step-down circuit, current sampling amplifier, SPI communication port and various protection circuits. The PC33896 directly receives the six PWM logic signals from the microcontroller and converts them into drive signals that drive the six FET gates. If the automotive system supply voltage is a new 42V power system, the on-chip DC / DC will be reduced to about 15V for FET gate circuit drive, saving the power dissipated by turning on and off the FET; if the car power supply The voltage is the current 12V power system. In some cases, the power supply voltage will not be enough to drive the FET gate. At this time, the charge pump circuit will raise it to at least 10V to ensure the normal driving of the FET. An internal current sense amplifier is used to measure the DC bus current. The MCU can send commands through the SP I port, configure PC33896 (such as DC / DC and charge pump operation, the amplification of the current amplifier, etc.) and diagnose its fault.

3.4 LIN physical layer communication module

MC33399 is a LIN transceiver chip for automotive electronics applications. It forms the physical basis for LIN communication with the SCI port of the microcontroller. It has both normal and sleep modes of operation, and wake-up frames on the bus can wake it up from sleep mode.

4 controller software design

Because the embedded hardware module of the MCU and the PC33896 have strong functions, the MCU has enough resources to complete the more complicated control strategy, so that the performance of the controller is greatly improved.

4.1 main program structure

The system's program uses a front-back structure. The foreground is the interrupt level and the background is the task level. The task level consists of an infinite loop and a LIN communication service program. The infinite loop contains a finite state machine and a 10ms service program. The finite state machine is shown in Figure 3. The system is powered on and enters an infinite loop after completing the initialization task. Once the SCI reception interrupt occurs, the interrupt service routine determines if the received sync interval field is received. If it is a synchronous interval field, the program does not return to the endless loop when exiting the interrupt service, but enters the LIN communication service program to receive and process the message frame. After completing the communication service, the program returns to the infinite loop. Based on the received message frame, the finite state machine switches to the corresponding state. In order to protect the motor, the transition between the forward and reverse states in the figure is forced to undergo an intermediate stop state transition. When an error event such as overcurrent or low voltage occurs, the controller enters an error state, which turns off all PWM outputs and logs the error code. After the controller receives the sleep frame of the bus, it enters the sleep state, and the bus wake-up signal will reactivate the controller. In the forward or reverse state, the 10ms service program in the infinite loop is executed every 10ms, completing tasks such as motor speed calculation, PI control algorithm, and battery voltage reading.

 

4.2 Customization of LIN communication message frames

The LIN bus is a master-slave communication mode, and the customization of message frames is performed during the overall design of the LIN network software. The brushless DC motor controller in this paper is a slave node on the bus, and the message frame it responds to is shown in Table 1. The identifier "0x3C" is a download command frame for the master node to broadcast commands and data to all slave nodes, where the first data byte is "00" is a sleep frame. The identifier "0x3D" is an upload command frame that triggers a slave node (addressed by a preferred download frame) to upload data to the host. The identifier "0x20" is a brushless motor control frame for the controller to receive the control information of the master node. The first data byte is "01", the motor is required to rotate forward, and the "02" is inverted, which is "04". It is stopped, and the third and fourth data bytes are the given values ​​of the motor speed. The identifier "0x21" is a motor status frame for the controller to transmit information to the master node, the first and second data bytes are the actual speed of the motor, and the third and fourth bytes represent the battery voltage.

4.3 Interrupt Service Program in Software

4.3.1 Timer A0, A1, A2 Input Capture Interrupt (inputcap2ture ISR1)

When the timers A0, A1, and A2 detect that the position signal has a transition edge, the input capture interrupt is input to the ISR1. The interrupt program reads the current level of the three pins and combines the values ​​read in the previous interrupt to query the commutation table to complete the commutation.

4.3.2 Timer A3 Input Capture Interrupt (InputCapture ISR2)

Timer A3 detects that the position signal of the A2 channel has a rising edge transition, causing an input capture interrupt inputcapture ISR2. The interrupt program reads the current value of the timer A3 channel capture register, and combines the value read in the previous interrupt with the number of overflows of the timer A to calculate the count of the high frequency clock pulse of the timer A in one position pulse period. Used for speed calculation.

4.3.3 Timer B Overflow Interrupt (TIMERB ISR)

Timer B overflows every 10ms, and the timer flag is set in the interrupt program, so that the 10ms service program in the main program infinite loop can be executed.

The interrupts of timer A3 and timer B are allowed to be turned off in the LIN communication service program, and the commutation interrupt is retained, thereby ensuring the reliability of communication and the stable operation of the motor.

5 test results

Using the designed controller, a brushless DC motor (the specification is equivalent to a brushless motor driven by a passenger car air-conditioning blower with a rated voltage of 48V and a rated power of 150W) is tested. The test chart is shown in Figure 4.

 

In Figure 4, the controller is powered by a dual voltage of 42V / 12V. LIN Figure 4 The main node of the test diagram bus is simulated by a PC. It is connected to the LIN bus via an RS232 serial port via a RS232 to LIN interface card PC card. The LIN communication software is developed using the Labview interface environment.

The actual operation results show that the motor can quickly start, brake, accurately track the given speed of the main node, and the controller runs stably and reliably, which can meet the requirements of real-time control.

6 Conclusion

The brushless DC motor controller based on LIN bus is designed by the author. The hardware circuit is simple in structure and compatible with the 42V power supply system of the future car. It has high cost performance. In addition, since the LIN bus is an open protocol, the controller is not only suitable for automotive electronics, but also for industrial control, home appliances and other fields.

Circuit Breaker

Circuit Breaker,Outdoor Circuit Breaker,Quality Circuit Breaker

Wecome Group Imp. & Exp. Co., Ltd. , http://www.china-vacuum-interrupter.com

This entry was posted in on