Implementation of discrete model reference adaptive algorithm in fuel cell vehicle based on DSP control system

Publisher:LuckyDaisyLatest update time:2024-07-26 Source: eepw Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Fuel cell vehicles use hydrogen as fuel. Hydrogen reacts chemically with oxygen in the atmosphere, converting chemical energy into electrical energy through electrodes, and using electrical energy as power to drive the vehicle forward. Fuel cell vehicles have high-tech advantages such as high efficiency, no pollution, zero emissions, and no noise. They represent the development trend of future automobiles using new energy, advanced technology, and the pursuit of environmental protection, and lead the new trend of the automobile industry revolution. The motor drive system is the heart of the fuel cell vehicle and directly affects the performance of the fuel cell vehicle. The development of digital signal processors (DSPs) makes it possible to apply various advanced control strategies to motor drive systems. The application of model reference adaptive control in electric vehicles can improve the performance of electric vehicle motor drive systems and accelerate the development of the electric vehicle industry.


l Fuel cell vehicle and its discrete MRAC motor control system

The fuel cell vehicle motor studied in this paper is a 5 kW DC traction motor of model XQ-5-5H. The motor is controlled by a double closed-loop speed regulation system including a current loop and a speed loop. Its structure block diagram is shown in Figure 1. The dotted box in the figure is implemented by a control system with DSP as the core. This paper mainly discusses its software design.

The design of the dual closed-loop speed control system is not discussed in detail here, only the design results are given here. The current is regulated by traditional PI mediation, and its transfer function is:

Where: K is the magnification factor of the proportional part of the PI regulator; τ is the integral time constant.
The speed is regulated by an adaptive mediation method. In order to facilitate computer implementation, a discrete model reference adaptive control is used. The structure diagram is shown in Figure 2. For a detailed description, please refer to the literature.

2 Control system software design

2.1 Hardware System Introduction

The hardware system block diagram of the fuel cell vehicle motor drive control system based on FMS320LF2407A is shown in Figure 3, which mainly includes a given signal detection circuit, a current detection circuit, a speed detection circuit, a PWM output circuit and a DSP external circuit.

2.2 Main program design

The main program includes two parts: initialization program and loop waiting. The main program runs automatically after the system is powered on or reset. It first initializes the system, mainly including hardware initialization, that is, assigning values ​​to various hardware such as clock and watchdog modules, I/O modules, timers, SCI modules, ADC modules, timers, control registers, etc. according to requirements so that each module can work normally, and initialization of program global variables, mainly including current PI regulation, speed adaptive control regulation parameter initialization and other global variable initialization, and then opening interrupts and waiting.

2.3 PWM interrupt processing program design

The A/D conversion is started by using the timer period interrupt flag. When T1 underflows, the A/D conversion is started. The detected current is processed and connected to the ADCIN00 pin of the analog/digital converter. When the conversion is completed, the interrupt flag bits are set to 1, and the conversion result is read out in the A/D interrupt service program to complete one A/D sampling. After the conversion is completed, a PWM interrupt is applied, and the PWM interrupt completes the main control function. The flow chart is shown in Figure 4. Since the mechanical time constant of the motor control system is much larger than the electrical time constant of the system, the speed loop control cycle of the system can be larger than the current loop control cycle. The system performs current sampling and PI adjustment once in each PWM cycle, so the current sampling cycle is the same as the PWM cycle, which can achieve real-time control, and the speed loop control cycle is selected as every 100 PWM cycles, and the speed is adjusted once. In each current control cycle, the number of pulses counted by the QEP unit is accumulated in the variable speedcount, and the variable speedflag is subtracted from the initial value speedstep(100) by 1 until it is equal to 0. At this time, the total number of pulses of 100 current control cycles (1 speed control cycle) is read for speed calculation, speedcount is cleared, the variable speedflag is assigned the initial value, and the next speed pulse count begins.

2.4 Current PI regulator program design

The regulator given by formula (1) is a continuous transfer function. In order to facilitate computer implementation, an anti-integral saturation PI regulator is used, and its algorithm is improved as follows:

Wherein: KI = KP / τ; KC = KI / KP = T / τ, according to the anti-saturation PI regulator algorithm to determine the system flow chart as shown in Figure 5.

2.5 Speed ​​Adaptive Programming

The speed adaptive adjustment algorithm is given in Figure 2. This algorithm is a discrete adaptive algorithm and can be directly used in program design. Discrete model reference adaptation is divided into two parts: reference model and controlled object, so the implementation of the reference model is discussed first. For the second-order reference model, its discrete equation can be expressed as:

In this way, the reference model output can be obtained. The speed output y(k) of the controlled object is detected by the speed detection circuit, and the prediction error can be obtained:

Based on the above analysis, a speed adaptive control program is written, and the flow chart is shown in Figure 6.

3 Conclusion

The application of adaptive control theory in the motor control system of fuel cell vehicles has a good effect on improving the driving performance of electric vehicles. This paper discusses the implementation of discrete model reference adaptive algorithm in the motor DSP control system, and actively explores the application of various advanced control strategies in electric vehicles, which is of great significance to promoting the development of the electric vehicle industry.


Reference address:Implementation of discrete model reference adaptive algorithm in fuel cell vehicle based on DSP control system

Previous article:What is slot fill rate? What effect does increasing the slot fill rate have on the motor?
Next article:Implementation of stall detection of NCV70522 in automotive adaptive front lighting system (AFS) application

Latest Embedded Articles
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号