MINISTRY OF EDUCATION AND TRAINING HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION GRADUATION THESIS AUTOMOTIVE ENGINEERING ANALYZING THE POSITION SENSOR TO CONTROL THE PMSM IN ELECTRIC VEHICLES INSTRUCTOR: DR.LE THANH PHUC STUDENT: BUI TRAN NGUYEN KHOA CAO CHI TINH SKL012547 Ho Chi Minh City, JANUARY, 2024 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION FACULTY OF INTERNATIONAL EDUCATION GRADUATION PROJECT ANALYZING THE POSITION SENSOR TO CONTROL THE PMSM IN ELECTRIC VEHICLES BUI TRAN NGUYEN KHOA Student ID: 19145192 CAO CHI TINH Student ID: 19145002 Major: AUTOMOTIVE ENGINEERING Supervisor: LE THANH PHUC, PhD. Ho Chi Minh City, January 2023 THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -------- Ho Chi Minh City, January 8, 2024 GRADUATION PROJECT ASSIGNMENT Student name: Cao Chi Tinh Student ID: 19145002 Student name: Bui Tran Nguyen Khoa Student ID: 19145192 Major: Automotive Engineering Class: 19145CLA3,4 Supervisor: Le Thanh Phuc, Ph.D Phone number: (+84) 932 591 200 Date of assignment: 28/09/2023 Date of submission: 08/01/2024 1. Project title: Analyzing the position sensor to control PMSM in electric vehicle 2. Initial materials provided by supervisor: PMSM, Signal conditioning for resolver 3.
Content of the project: General research about the topic, Design the circuit, Experiment 4. Final product: Screen the angle of Rotor to LCD CHAIR OF THE PROGRAM SUPERVISOR (Sign with full name) (Sign with full name) THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -------- ---- SUPERVISOR’S EVALUATION SHEET Student name: Cao Chi Tinh Student ID: 19145002 Student name: Bui Tran Nguyen Khoa Student ID: 19145192 Major: AUTOMOTIVE ENGINEERING Project title: ANALYZING THE POSITION SENSOR TO CONTOL PMSM IN ELECTRIC VEHICLE Supervisor: LE THANH PHUC Ph. Content of the project:. Approval for oral defense? (Approved or denied).
Ho Chi Minh City, month day, year SUPERVISOR (Sign with full name) THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -------- PRE-DEFENSE EVALUATION SHEET Student name: Cao Chi Tinh Student ID: 19145002 Student name: Bui Tran Nguyen Khoa Student ID: 19145192 Major: AUTOMOTIVE ENGINEERING Project title: ANALYZING THE POSITION SENSOR TO CONTOL PMSM IN ELECTRIC VEHICLE Name of Examiner:. Content and workload of the project. Approval for oral defense? (Approved or denied) .) Ho Chi Minh City, month day, year EXAMINER (Sign with full name) THE SOCIALIST REPUBLIC OF VIETNAM Independence – Freedom– Happiness -------- EVALUATION SHEET OF DEFENSE COMMITTEE MEMBER Student name: Cao Chi Tinh Student ID: 19145002 Student name: Bui Tran Nguyen Khoa Student ID: 19145192 Major: AUTOMOTIVE ENGINEERING Project title: ANALYZING THE POSITION SENSOR TO CONTOL PMSM IN ELECTRIC VEHICLE Name of Defense Committee Member:. Content and workload of the project .) Ho Chi Minh City, month day, year COMMITTEE MEMBER (Sign with full name) Disclaimer This research is considered a document of our group's own, so it may not be completely accurate in theory due to many other influencing factors (components, power sources, so on).
This is for reference only and will contain other references and we will not be responsible for these references. i Acknowledgements In order to finish this project, we would like to express our gratitude to all of the instructors at Ho Chi Minh City University of Technology and Education, particularly the faculty members of the Faculty for High-Quality Training, for their enthusiastic instruction and unwavering support, which allowed us to gain a great deal of knowledge while we were students. Our group would like to sincerely thank Mr. Le Thanh Phuc, the instructor, for his enthusiastic support, guidance, and suggestions during the group's graduation thesis completion process.
In order to facilitate the research process, he gave us access to a good equipped laboratory. In addition, the group expressed gratitude to every employee in Mr. Le Thanh Phuc's lab for their enthusiastic support in acquiring additional knowledge necessary to finish this aptitude. Once again, we would like to thank the teachers at Ho Chi Minh City University of Technology and Education and the teachers of the Faculty for High-Quality Training.
ii Table of Contents GRADUATION PROJECT ASSIGNMENT. SUPERVISOR’S EVALUATION SHEET. PRE-DEFENSE EVALUATION SHEET. EVALUATION SHEET OF DEFENSE COMMITTEE MEMBER.
ii Table of Contents. iii List of Figures. vi List of Tables.1 Reason for choosing the topic .4 Scope of research. 2 Chapter 2: LITERATURE REVIEW .2 Structure of PMSM engine .4 Pros and Cons of PMSM .1 Concept of resolver…………………………………………………….3 Signal conditioning for SINE/COSINE windings.4 The necessary parameters for the Sin/Cos signal amplifier circuit .5 H-Bridge Circuit uses MOSFET for change the frequency .6 Sine PWM three-phases……………………………………………….3 Electronic components used in the project .1 OP-AMP IC LM358P .1 Introduction to STM32CubeMX .2 STM32CubeMX workspace .3 Keil C programing workspace.
36 Chapter 3: SYSTEM DESIGN OF RESOLVER & H-BRIDGE CIRCUIT .1 STM32CubeMX setup .1 Half-wave rectifier circuit .2 Schematic resolver sine/cosine receiver circuit .3 H-Bridge with MOSFET:. 46 Chapter 4: EXPERIMENT RESULTS AND DISCUSSION .2 Tested rotation period of rotor and displays the Theta angle to LCD. 51 Chapter 5: CONCLUSION AND RECOMMENDATION .60 Code for schematic resolver SINE/COSINE receiver circuit………….……61 Code for H-Bridge Circuit…………………………………………….73 v List of Figures Figure 2. Structure of PMSM engine.
Structure of Stator. Structure of Rotor. Operating principle of PMSM engine. PMSM control diagram.
Signal received from Resolve………………………………………………7 Figure 2. Schematic resolver sine receiver circuit. Schematic resolver cosine receiver circuit. Application schematic for Sine/Cosine receiver circuit.
MOSFET trigger circuit diagram using IC IR2103. Voltage level diagram of input and output pin of IC IR2103. Three-phase PWM Sine Pulse. Carrier wave and active wave.
Generate Sine PWM using carrier wave and sine wave. IGBT layout diagram. State of 4 IGBT. OP AMP IC LM358P.
Pin diagram of IC LM358P. Structure of STM32F103C8T6. Diode basic structure .Forward biased diode. Reverse biased diode.
Diode V-I characteristic curve. Different type of resistors. Structure and symbol of capacitor. Different types of capacitor.
LM7805 pin out diagram. Application circuit for LM7805. 16x2 LCD and pin diagram. Initial startup windows of STM32CubeMX.
Choose type of microcontroller. CubeMx select output. Select pulse clock. PWM generation mode at PA0.
Place for coding. Order of setting up for loading configuration. Select debug adapter. Build and load.
Setup GPIO for STM32. Setup NVIC for STM32. System Simulation in PROTUES…………………………………. Simulation Half wave rectifier circuit.
Input and output waveform. Pusle before/after rectifier. Half-wave rectifier soldered circuit. Schematic resolver sine/cosine receiver circuit.
Schematic resolver sine/cosine receiver soldered circuit………………. Simulation Printed Circuit Board. Printed Circuit Board of system. H-Brigde designed in Protues……………………………………………46 Figure 3.
H-Brigde soldered circuit………………………………………………. Soldered circuit of system………………. Output Sine signal before amplifier. Output Sine/Cosine signal after amplifier.
Output Sine/Cosine with excitation signal after half-wave rectifier. Signal of excitation coil without H-Brigde circuit with MOSFET. Signal of excitation coil after applying H-Brigde circuit with MOSFET. First position of Rotor (00).
Result testing of first position. LCD screen value of Rotor at position 450. Rotor at position 890. LCD screen value of position roto r at 890.
Rotor at position 1800. LCD screen value of position rotor at 1800. 53 viii List of Tables Table 2. Technical specifications of LM358.
Sine/Cosine values in quadrants and corresponding Theta angle values. 53 ix Abstract The main goal of this research revolves around designing and making a control circuit that can amplify the output signals of the sine and cosine coils from the three-phase PMSM. Using the STM32F103C8T6 microcontroller to take the ADC signal from these two coils and based on the digital pulse from the half-wave rectifier circuit (thanks to the microcontroller), which continuously switches on and off to find the intersection point between the Sine/Cosine pulse and the digital pulse on the falling edge and calculate the Theta angle (Rotor position) on the journey. We also apply an H-Bridge circuit control the MOSFET by the STM32F103C8T6 that outputs Sine PWM pulses to two IR2103 ICs so that each of them can detect high or low levels, thereby adjusting the conduct of the corresponding MOSFET pairs to increase the output frequency of the input voltage, from this result more values of the position sensor can be obtained.
Based on the knowledge learned and the parameters of the components, our group designed the circuit and obtained quite stable results. Key words: Three-phase PMSM, Amplifier, IC OP-AMP LM358P, MOSFET, STM32F103C8T6, Schematic Resolver receiver, H-Brigde circuit, IC IR2103.1 Reason for choosing the topic The need for the development and manufacturing of electric motors is being driven by numerous enterprises as electric motor-powered gadgets become more and more common and eventually replace fossil fuel engines. Not to add, many nations are focusing their research and development efforts on electric-motor vehicles, and Vietnam is by no means an exception to this global trend. According to [1], it is evident that the Vietnamese market has enormous potential for the development of electric vehicles; currently, 1,100 mostly imported vehicles are in use for leisure and personal use.
Vietnamese consumers have not truly embraced electric automobiles, nevertheless, since the economy and performance of electric motors are still not thought to be as good as those of gasoline engines, based on 33% of poll participants. Referred to from a recent poll, the intention to purchase an electric automobile [2]. Researchers need tools to assess engines and increase the efficiency of electric motors in order to stay up with the ongoing development of electric vehicles and the capacity to localize products. Consequently, it is essential to conduct research and design electric motor testing apparatus.
Vietnam is one of the national being pressured to create electric vehicles, despite not being a leader in the sector. Since then, research and design have gone into creating an electric motor test bench. Research, design, and production of electric vehicles based on widely used electric motors in Vietnam would eventually be feasible.2 Research objective - Calculate and design the control circuit to drive the PMSM 3-phase electric motor. - Understand the operating principles of PMSM 3-phase electric motors.
- Understand the operating principles of signal amplifier circuits. - Understand and program the STM32 microcontroller to perform external - interrupts and read ADC from signal pins to the microcontroller. - Increase the frequency of the excitation coil so that more values can be obtained in reading the ADC of the microcontroller.3 Research subjects - Microcontroller STM32F103C8T6 - IC OP-AMP LM358P 1 - IC IR2103 - MOSFET - PMSM 3-phase electric motor - Software STM32CubeMx - Keil uVision5 software - Proteus software.4 Scope of research Due to limited time, only three months, the team focused on developing a circuit to amplify the signal frequency of the two SIN/COSINE coils, increase the frequency of the Excitation coil and program to read the ADC signal of the two coils using How to use external interrupt using STM32. Our group only focused on finding the Theta angle to determine the position of the rotor to control the motor's operation.
Our team did not go into the work of calculating power or controlling the speed of the motor.5 Research Methods Use theoretical and experimental calculation methods. The team researches from documentary sources, scientific articles on the Internet, basic electronics textbooks, power electronics, and microcontrollers.6 Research contents - Overview of related studies. - Design of PMSM 3-phase electric motor signal amplifier. - Collects signals from the coils from the motor.
- Evaluate the data collected. - Propose project development direction.7 Research layout - Chapter 1: Overview - Chapter 2: Theoretical basis. - Chapter 3: System design and construction. - Chapter 5: Conclusion and recommendations.
2 Chapter 2: LITERATURE REVIEW 2.1 PMSM - Permanent Magnet Synchronous Motor 2.1 Definition PMSM (Permanent Magnet Synchronous Motor) 3-phase electric motor is a type of electric motor with permanent magnets on the rotor.