scieee AI-readable full text Open interactive document viewer

Design, development, and optimization of an electronic control unit for an electric racing motorcycle

Díaz Juan, Ignasi

Abstract

Mai s'insistirà prou en la importància dels vehicles elèctrics en el món actual. Aquests innovadors vehicles estan guanyant un ampli reconeixement i adopció a causa dels seus nombrosos avantatges, que van més enllà dels conductors individuals i abasten beneficis mediambientals, econòmics i socials. A més, en el panorama automobilístic actual, els vehicles s'han convertit en alguna cosa més que mers mitjans de transport. Són màquines complexes, controlades per ordinador i dissenyades per a oferir seguretat, eficiència i rendiment. En el centre d'aquesta evolució tecnològica es troba la unitat de control electrònic, un component fonamental responsable de gestionar diversos aspectes del funcionament d'un vehicle. Una unitat de control electrònic, sovint denominada ECU, és un ordinador compacte però potent dissenyat per a gestionar i optimitzar el rendiment de diversos sistemes d'un vehicle. Tot vehicle modern sol contenir diverses ECU, cadascuna d'elles responsable de funcions específiques. Alguns exemples són la gestió del control del motor, funcions de seguretat com el control del coixí de seguretat o el sistema antibloqueig de frens (ABS), o fins i tot el climatitzador i les funcions de confort dels cotxes moderns. A més, amb l'auge dels vehicles elèctrics i autònoms, les ECU exerciran un paper encara més central en la gestió de la distribució d'energia, el rendiment de la bateria i els sistemes avançats d'assistència al conductor. L'ECU és un testimoniatge del poder de l'electrònica i la informàtica per a revolucionar la indústria de l'automòbil, fent que els vehicles siguin més segurs, més eficients i agradables de conduir. Aquest projecte comprèn el disseny, desenvolupament i fabricació d'una ECU per a una motocicleta elèctrica de carreres que competirà en la setena edició de MotoStudent Electric, una competició biennal que reuneix equips d'estudiants d'enginyeria de tot el món

Full text

Treball de Fi de Grau Grau en Tecnologies Industrials i Anàlisi Econòmica Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle REPORT Author: Ignasi Díaz Juan Supervisor: Joan Gabriel Bergas Jané Call: September 2023 Escola Tècnica Superior d’Enginyeria Industrial de Barcelona Pag. 2 Report Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 3 Resum Mai s'insistirà prou en la importància dels vehicles elèctrics en el món actual. Aquests innovadors vehicles estan guanyant un ampli reconeixement i adopció a causa dels seus nombrosos avantatges, que van més enllà dels conductors individuals i abasten beneficis mediambientals, econòmics i socials. A més, en el panorama automobilístic actual, els vehicles s'han convertit en alguna cosa més que mers mitjans de transport. Són màquines complexes, controlades per ordinador i dissenyades per a oferir seguretat, eficiència i rendiment. En el centre d'aquesta evolució tecnològica es troba la unitat de control electrònic, un component fonamental responsable de gestionar diversos aspectes del funcionament d'un vehicle. Una unitat de control electrònic, sovint denominada ECU, és un ordinador compacte però potent dissenyat per a gestionar i optimitzar el rendiment de diversos sistemes d'un vehicle. Tot vehicle modern sol contenir diverses ECU, cadascuna d'elles responsable de funcions específiques. Alguns exemples són la gestió del control del motor, funcions de seguretat com el control del coixí de seguretat o el sistema antibloqueig de frens (ABS), o fins i tot el climatitzador i les funcions de confort dels cotxes moderns. A més, amb l'auge dels vehicles elèctrics i autònoms, les ECU exerciran un paper encara més central en la gestió de la distribució d'energia, el rendiment de la bateria i els sistemes avançats d'assistència al conductor. L'ECU és un testimoniatge del poder de l'electrònica i la informàtica per a revolucionar la indústria de l'automòbil, fent que els vehicles siguin més segurs, més eficients i agradables de conduir. Aquest projecte comprèn el disseny, desenvolupament i fabricació d'una ECU per a una motocicleta elèctrica de carreres que competirà en la setena edició de MotoStudent Electric, una competició biennal que reuneix equips d'estudiants d'enginyeria de tot el món. Pag. 4 Report Resumen Nunca se insistirá lo suficiente en la importancia de los vehículos eléctricos en el mundo actual. Estos innovadores vehículos están ganando un amplio reconocimiento y adopción debido a sus numerosas ventajas, que van más allá de los conductores individuales y abarcan beneficios medioambientales, económicos y sociales. Además, en el panorama automovilístico actual, los vehículos se han convertido en algo más que meros medios de transporte. Son máquinas complejas, controladas por ordenador y diseñadas para ofrecer seguridad, eficiencia y rendimiento. En el centro de esta evolución tecnológica se encuentra la unidad de control electrónico, un componente fundamental responsable de gestionar diversos aspectos del funcionamiento de un vehículo. Una unidad de control electrónico, a menudo denominada ECU, es un ordenador compacto pero potente diseñado para gestionar y optimizar el rendimiento de varios sistemas de un vehículo. Todo vehículo moderno suele contener varias ECU, cada una de ellas responsable de funciones específicas. Algunos ejemplos son la gestión del control del motor, funciones de seguridad como el control del airbag o el sistema antibloqueo de frenos (ABS), o incluso el climatizador y las funciones de confort de los coches modernos. Además, con el auge de los vehículos eléctricos y autónomos, las ECU desempeñarán un papel aún más central en la gestión de la distribución de energía, el rendimiento de la batería y los sistemas avanzados de asistencia al conductor. La ECU es un testimonio del poder de la electrónica y la informática para revolucionar la industria del automóvil, haciendo que los vehículos sean más seguros, más eficientes y agradables de conducir. Este proyecto comprende el diseño, desarrollo y fabricación de una ECU para una motocicleta eléctrica de carreras que competirá en la séptima edición de MotoStudent Electric, una competición bienal que reúne a equipos de estudiantes de ingeniería de todo el mundo. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 5 Abstract The importance of electric vehicles (EVs) in today's world cannot be overstated. These innovative vehicles are gaining widespread recognition and adoption due to their numerous advantages, which extend beyond individual drivers to encompass environmental, economic, and societal benefits. Furthermore, in the actual automotive landscape, vehicles have become more than mere modes of transportation. They are intricate, computer-controlled machines designed for safety, efficiency, and performance. At the heart of this technological evolution lies the Electronic Control Unit, a pivotal component responsible for managing various aspects of a vehicle's operation. An Electronic Control Unit, often referred to as an ECU, is a compact but powerful computer designed to manage and optimize the performance of various systems within a vehicle. Every modern vehicle typically contains several ECUs, each responsible for specific functions. Some examples include engine control management, safety features such as airbag control or Antilock Braking System (ABS), or even climate control and comfort features in modern cars. Additionally, with the rise of electric and autonomous vehicles, ECUs will play an even more central role in managing power distribution, battery performance, and advanced driver assistance systems. The ECU is a testament to the power of electronics and computing in revolutionizing the automotive industry, making vehicles safer, more efficient, and more enjoyable to drive. This project comprehends the design, development, and manufacturing of an ECU for an electric racing motorcycle that will compete in the seventh edition of MotoStudent Electric, a biennial competition that gathers engineering student teams from all over the world. Pag. 6 Report Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 7 Contents RESUM ______________________________________________________ 3 RESUMEN ___________________________________________________ 4 ABSTRACT ___________________________________________________ 5 CONTENTS ___________________________________________________ 7 ABBREVIATIONS AND SYMBOLS ________________________________ 9 1. PREFACE _______________________________________________ 11 1.1. Project origin ................................................................................................ 11 2. INTRODUCTION __________________________________________ 12 2.1. Motivation ..................................................................................................... 12 2.2. Objectives .................................................................................................... 12 3. ELECTRIC MOTORCYCLE ARCHITECTURE __________________ 13 3.1. Narrowing the scope .................................................................................... 16 3.2. Battery Pack ................................................................................................. 17 3.2.1. BMS ................................................................................................................ 17 3.3. Electric Motor ............................................................................................... 19 3.4. Inverter ......................................................................................................... 22 4. DESIGNING AN ECU ______________________________________ 24 4.1. The Digital Signal Processor (DSP) ............................................................. 26 4.1.1. TMS320F28379D ............................................................................................ 28 4.2. Introduction to analog signals ...................................................................... 30 4.2.1. The Analog-to-Digital Converter (ADC) ........................................................... 30 4.2.2. LMP7715......................................................................................................... 31 4.2.3. AD8137YRZ .................................................................................................... 32 4.3. Power Supply ............................................................................................... 35 4.3.1. TPS5450 ......................................................................................................... 35 4.3.2. Component dimensioning and schematics ...................................................... 37 4.4. Physical signals............................................................................................ 40 4.4.1. Throttle Potentiometer ..................................................................................... 40 4.4.2. Quickshifter ..................................................................................................... 42 4.5. Motor signals ................................................................................................ 43 4.6. Digital inputs ................................................................................................. 46 4.7. Output signals .............................................................................................. 47 4.8. Communications .......................................................................................... 48 Pag. 8 Report 4.8.1. Controller Area Network (CAN) ....................................................................... 48 4.8.2. Serial Peripheral Interface ............................................................................... 50 4.8.3. Serial Communication Interfaces .................................................................... 51 4.9. Current measurement .................................................................................. 52 4.10. Gate drive signals ........................................................................................ 53 4.11. Connectors ................................................................................................... 55 4.11.1. LAUNCHXL-F28379D connectors .................................................................. 56 4.12. Clamping protection ..................................................................................... 57 5. FINAL DESIGN ___________________________________________ 58 5.1. Manufacturing and physical prototype ......................................................... 59 5.2. Testing ......................................................................................................... 61 6. PLANNING ______________________________________________ 63 7. ECONOMIC ASSESSMENT _________________________________ 64 8. ENVIRONMENTAL ASSESSMENT ___________________________ 65 9. SOCIAL AND GENDER EQUALITY ASSESSMENT ______________ 67 10. CONCLUSIONS __________________________________________ 68 11. BIBLIOGRAPHY __________________________________________ 69 Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 9 Abbreviations and Symbols EV: Electric Vehicle DC: Direct current. ECU: Electronic Control Unit DSP: Digital Signal Processor PWM: Pulse Width Modulation APWM: Analog Pulse Width Modulation SD: Sigma-Delta ETSEIB: Escola Tècnica Superior d’Enginyeria Industrial de Barcelona Pag. 16 Report 3.1. Narrowing the scope Having introduced the main components that build up an electric motorcycle, from now on this work will focus on the electric side of the vehicle. Figure 2 shows a general block diagram of the electrical architecture of an EV. Figure 2. General EV electric architecture [1]. The inverter, which supplies power to the traction electric motor, the DC/DC converter, which connects the high-voltage system with the low-voltage system, and the on-board charger are the main power electronic converters in an EV powertrain. The powertrain DC/DC converter allows to boost (or, by contrary, decrease) the battery voltage to whatever desired output level, but it is not always present nor necessary in all EVs. The following sections will extend the explanation on some of the previously presented components and the characteristics of the prototype where the ECU designed and manufactured on this project will be installed. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 17 3.2. Battery Pack The battery is the power source of the motorcycle. It is a set of elements responsible for storing and delivering electrical energy to the vehicle in a safe way. The main functions of the battery, alongside the electronics that manage it, are the following: 1. To store and deliver the electrical energy by means of energetic cells. 2. Maintain the cells in a safe working environment for proper operation. 3. Protect the rider and/or other electrical systems of the motorcycle by cutting off or limiting the outgoing current from the battery. To obtain the desired voltage, power and capacity levels, several individual electrochemical cells are connected in series and/or parallel, resulting in a complex array that must be controlled by the Battery Management System (BMS). 3.2.1. BMS The Battery Management System (BMS) is the system responsible for keeping the battery cells in an optimal and safe operating range called Safe Operating Area (SOA). To do this, it must monitor the voltages of each cell, as well as the temperature at different points of the battery and perform the necessary actions according to the data obtained. Apart from the main function previously described, the BMS will be responsible for maximizing the efficiency of the battery, doing the balancing of the cells. This process consists of levelling the voltages of each cell to mitigate the possible existence of imbalances between them. In this way, it is possible to optimize the battery capacity at the end of the charging process. The charging process will stop if the voltage limit or maximum temperature is reached by a cell. Additionally, the BMS will immediately deactivate the vehicle traction system if the voltage or temperature of any cell is located outside the SOA. This function will be carried out by opening the HVS contactor. Pag. 18 Report Likewise, certain algorithms will be included in order to estimate the State of Charge (SOC) and State of Health (SOH) of the battery throughout the cycles of use. All the data obtained by the BMS will be communicated to the different devices of the vehicle via a CAN communications bus. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 19 3.3. Electric Motor As previously stated when describing the architecture of an electric motorcycle, there exist several kinds of electric motors. In the case that concerns the present work, the prototype is equipped with the CIRCE-MS2223 unit, a Permanent Magnet Synchronous Motor (PMSM) provided by the competition. In this way, all teams have the same material to start building their own racing motorcycles. Some of the working principles and characteristics of PMSM are listed below: 1. Permanent Magnets. A PMSM contains permanent magnets mounted on the rotor (the rotating part) of the motor. These magnets produce a fixed magnetic field. 2. Stator Windings. Around the rotor is the stator (the stationary part) of the motor. The stator contains a set of coil windings that are energized with alternating current (AC) to create a magnetic field. 3. Synchronization. The PMSM operates synchronously with the alternating current supplied to the stator. The term "synchronous" in its name indicates that the rotor rotates in sync with the changing magnetic field produced by the stator. 4. Magnetic Field Interaction. When the stator windings are energized, they produce a rotating magnetic field that interacts with the fixed magnetic field generated by the permanent magnets on the rotor. This interaction creates a torque on the rotor, causing it to rotate. 5. Position Sensors. In some PMSM applications, position sensors, such as encoders or resolvers, may be used to provide feedback on the rotor's position and speed. This feedback is crucial for precise control and maintaining synchronization between the rotor and stator fields. 6. Controller. A controller or motor drive unit manages the power supplied to the stator windings. It adjusts the frequency and amplitude of the AC supplied to the windings to control the motor's speed and direction. Pag. 20 Report 7. Speed Control. By adjusting the frequency and amplitude of the AC voltage applied to the stator windings, the controller can vary the speed of the PMSM. Lower frequencies result in slower speeds, while higher frequencies lead to faster rotations. 8. Torque Control. The controller can also control the torque output of the motor by adjusting the current supplied to the stator windings. This allows for precise control of the motor's performance and torque characteristics. 9. Efficiency. PMSMs are known for their high efficiency, as they do not have brushes that cause friction and wear, like in brushed motors. This efficiency makes them suitable for applications where energy conservation is important. 10. Regeneration. PMSMs can also act as generators when the rotor is turned externally. This property is used in regenerative braking systems in electric vehicles, where the motor can recover and convert kinetic energy back into electrical energy during braking. In summary, a PMSM operates by creating a rotating magnetic field in the stator that interacts with the fixed magnetic field in the rotor, generating torque and causing the rotor to rotate in synchronous with the stator field. Precise control of the stator current frequency and amplitude allows for accurate control of speed and torque. Figure 3 displays some technical details of the CIRCE-MS2223 PMSM motor. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 21 Figure 3. CIRCE MS2223 datasheet snippet [2]. Pag. 22 Report 3.4. Inverter An electric vehicle inverter, often referred to as an "inverter drive" or "power inverter," is a critical component of electric vehicles (EVs). Its primary function is to convert direct current (DC) power from the vehicle's high-voltage battery into alternating current (AC) power that drives the electric motor. Here are the key aspects of an electric vehicle inverter: 1. Motor Control. In addition to converting DC to AC, the inverter controls the frequency, voltage, and phase of the AC power supplied to the electric motor(s). This precise control allows for adjustments in motor speed, torque, and direction, providing dynamic and efficient vehicle performance. 2. Regenerative Braking. Many EVs use regenerative braking systems to recover energy during braking and deceleration. The inverter plays a crucial role in managing this process by converting kinetic energy into electrical energy, which can be stored in the battery for later use. 3. Power Management. Inverters also manage power distribution within the vehicle, ensuring that the electric motor(s) receive the appropriate amount of power based on driver inputs (acceleration, braking, etc.) and vehicle conditions (e.g., maintaining traction and stability). 4. Thermal Management. Electric vehicle inverters generate heat during operation. Effective thermal management systems, such as cooling or heating, are integrated into the inverter to maintain optimal operating temperatures and protect against overheating. 5. Efficiency and Power Density. Inverter efficiency is a critical factor in EV performance and range. High-efficiency inverters minimize energy losses during the DC to AC conversion process, contributing to better overall efficiency and longer driving ranges. Power density, or the compactness of the inverter design, is also important to save space and reduce weight in the vehicle. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 23 6. Safety Features. EV inverters incorporate safety features, such as overcurrent and overvoltage protection, to safeguard the components and the vehicle in the event of electrical anomalies or system failures. 7. Integration with Vehicle Control Systems. Inverters are tightly integrated with the vehicle's overall control systems. They receive commands from the vehicle's electronic control unit (ECU) or powertrain control module (PCM) to ensure smooth operation and responsiveness. Six switches make up the inverter (two per phase), which transforms the available DC voltage into a balanced, three-phase AC voltage with the desired magnitude and frequency. Figure 4 shows a simplified schematic representation of the inverter topology, while in Figure 5 the whole PMSM motor drive structure can be observed. The following chapter will target the design of the motorcycle controller. Figure 4. Six-switch voltage source inverter. [1] Figure 5. PMSM motor drive structure. [1] Pag. 24 Report 4. Designing an ECU Designing an Electronic Control Unit (ECU) is a complex and specialized task that typically involves a multidisciplinary team of engineers with expertise in electronics, software development, mechanical design, and specific domain knowledge related to the ECU's intended application. The following list defines some of the steps that one must consider before starting with the design process: 1. Define the Requirements. Clearly define the functional requirements of the ECU, including its intended application, performance specifications, and environmental conditions it will operate in. Consider factors like temperature range, humidity, and vibration. 2. Select the Microcontroller/Processor. Choose a microcontroller or processor that suits the ECU's requirements. Consider factors such as processing power, memory capacity, power efficiency, and available peripherals (e.g., analog-to- digital converters, communication interfaces). 3. Design the Hardware. Develop the hardware design for the ECU. This includes: - Schematic Design: Create the electronic circuit schematic, specifying the components (e.g., microcontroller, sensors, power supplies, communication interfaces). - PCB Layout: Design the printed circuit board (PCB) layout, considering signal integrity, power distribution, and thermal management. - Component Selection: Choose appropriate electronic components, ensuring they meet the required specifications and quality standards. - Signal Conditioning: Implement signal conditioning circuits for sensors and actuators, such as amplifiers, filters, and voltage regulators. - Power Supply: Design a stable and efficient power supply system for the ECU and its components. - Safety Measures: Include safety features and fail-safe mechanisms, if necessary, especially in critical applications. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 25 4. Software Development. Develop the software for the ECU, including the embedded firmware. This involves: - Programming: Write code for the microcontroller, ensuring that it can perform the required functions, handle inputs from sensors, and control outputs to actuators. - Real-Time Processing: Implement real-time algorithms if the ECU operates in a time-critical environment. - Communication Protocols: Implement communication protocols (e.g., CAN, Ethernet, SPI) to exchange data with other ECUs or external devices. - Calibration and Tuning: Create interfaces or tools for calibration and tuning of control algorithms, especially in automotive ECUs. - Testing and Debugging: Perform thorough testing and debugging to ensure the software operates reliably and meets performance goals. 5. Integration and Testing. Integrate the hardware and software components into a working prototype ECU. Test the ECU in a controlled environment to validate its functionality and performance. Conduct rigorous testing, including functional tests, performance tests, and validation tests under various conditions and scenarios. 6. Compliance and Certification. Ensure that the ECU complies with relevant industry standards, regulations, and safety certifications, especially in safetycritical applications like automotive or aerospace. 7. Prototyping and Iteration. Build and evaluate prototypes, making design adjustments as necessary based on testing results and feedback. 8. Production Design. Once the design is finalized and validated, move to production-level design and manufacturing. This includes producing PCBs, sourcing components, and ensuring quality control. 9. Documentation. Maintain comprehensive documentation for the ECU, including schematics, PCB layouts, software code, user manuals, and test procedures. This documentation is critical for troubleshooting, maintenance, and future updates. Pag. 32 Report 5. Wide Supply Voltage Range. It can operate over a wide supply voltage range, typically from 1.8V to 5.5V, making it compatible with a variety of power supply configurations. 6. Unity Gain Stable. The LMP7715 is unity gain stable, meaning it can be operated at a gain of 1 without external compensation components. This simplifies circuit design in applications requiring a voltage buffer or follower. Figure 9. LMP7715 connection diagram. [4] 4.2.3. AD8137YRZ The AD8137 is a fully differential amplifier integrated circuit (IC) designed and manufactured by Analog Devices, Inc. It is specifically engineered for high-performance differential signal amplification. Here are the key features and characteristics of the AD8137 fully differential amplifier: 1. Fully Differential Amplification. The AD8137 is designed to amplify differential input signals, which means it amplifies the voltage difference between two input pins (IN+ and IN-) while rejecting common-mode signals. 2. High Bandwidth. This amplifier offers a high bandwidth, typically exceeding several hundred megahertz (MHz). This wide bandwidth makes it suitable for highfrequency signal processing applications, including video and RF applications. 3. Low Distortion. The AD8137 is known for its low distortion characteristics, which include low harmonic distortion and intermodulation distortion. This makes it suitable for applications requiring high signal fidelity. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 33 4. Differential Gain Control. The amplifier allows for precise gain control through external resistors, enabling users to set the desired amplification factor according to their specific requirements. 5. Differential and Single-Ended Outputs. The AD8137 provides both differential and single-ended output options, offering flexibility in interfacing with other components and systems. 6. Low Noise. It features low input-referred noise, which is advantageous in applications where low noise is crucial for preserving signal integrity. 7. Wide Supply Voltage Range. The device can operate from a wide supply voltage range, typically between ±12V, making it compatible with various power supply configurations. 8. Common-Mode Rejection Ratio (CMRR). The AD8137 boasts a high CMRR, which means it effectively rejects common-mode signals and noise while amplifying the differential signal of interest. 9. High Input Impedance. The amplifier has a high input impedance, minimizing loading effects on the source and allowing for interfacing with high-impedance sensors or sources. Figure 10. AD8137 pin description (top), maximum ratings (left), pin diagram (right). [5] Pag. 34 Report Figure 11 represents a simplified schematic of a fully differential amplifier circuit. It has two differential inputs and two differential outputs, and as every other op-amp, external resistors set the system gain. The AD8137 also allows to set the output common-mode voltage through the VOCM pin. Unless otherwise specified, it will always be connected to 1,5V. Equations 1 to 3 define how to calculate the differential output voltages. Figure 11. Fully differential amplifier simplified application schematic. 𝛽1= 𝑅3 𝑅3+𝑅4 ; 𝛽2= 𝑅1 𝑅1+𝑅2 (Eq. 1) 𝑉𝑂𝑈𝑇+ = 𝑉𝐼𝑁+×(1−𝛽1) − 𝑉𝐼𝑁−×(1−𝛽2)+2×𝑉𝑂𝐶𝑀×𝛽1 𝛽1+𝛽2 (Eq. 2) 𝑉𝑂𝑈𝑇− = −𝑉𝐼𝑁+×(1−𝛽1) + 𝑉𝐼𝑁−×(1−𝛽2)+2×𝑉𝑂𝐶𝑀×𝛽2 𝛽1+𝛽2 (Eq. 3) Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 35 4.3. Power Supply The motorcycle HV to LV DC/DC converter outputs 24V. This is the voltage at which the ECU will operate, but inside the board there are plenty of systems that require different voltage levels. The following list of voltages are necessary: 1. 3,3V 2. 5V 3. 12V 4. 15V To generate all the listed voltages from the input 24V, a circuit based upon the voltage regulator TPS5450 will be designed for each of the desired levels. 4.3.1. TPS5450 The TPS5450 is a high-performance, synchronous step-down (buck) DC-DC voltage regulator from Texas Instruments. It is designed for use in various power supply applications, providing efficient and reliable voltage regulation. Here are some key characteristics and features of the TPS5450: 1. Input Voltage Range: The TPS5450 typically operates with an input voltage range from 5.5V to 36V. 2. Output Voltage Range: It can provide adjustable output voltages down to 1,22V. The output voltage can be tweaked using external resistors to set the desired voltage level. 3. Output Current: The device is capable of sourcing up to 5A of continuous output current, making it suitable for a wide range of applications. 4. Efficiency: The TPS5450 is designed for high efficiency, with efficiencies exceeding 90% in typical operating conditions. 5. Switching Frequency: It operates at a fixed switching frequency of 500 kHz, which helps minimize the size of external passive components. 6. Voltage Reference: The device includes an internal voltage reference with a typical accuracy of 1%. Pag. 36 Report After reviewing the TPS5450 main characteristics and assuring that both input voltage (24V) and output voltages (from 3,3V to 15V) lie inside the chips’ working range, it is time to proceed with the circuit design, but, before that, may the reader have a look at some of the manufacturers’ documentation. Figure 13 defines every pin functionality, while Figure 12 represents a simplified schematic of how it may be connected, and the external components needed. Figure 12. TPS5450 manufacturer’s simplified schematic. [6] Figure 13. TPS5450 manufacturer’s pin functions list. [6] Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 37 4.3.2. Component dimensioning and schematics Following the manufacturer's recommendations, the external circuitry has been designed and all components carefully selected, such as input and output decoupling capacitors, inductors, and the Schottky catch diode. The output voltage is set by a resistor divider between the output pin (PH) and the reference pin (VSENSE). Knowing that the reference pin is always adjusted to remain at 1,221V, the output voltage can be obtained as follows: 𝑉𝑜𝑢𝑡 = 1,221 × 𝑅2+𝑅1 𝑅2 (Eq. 4) Thus, substituting the desired output voltage into equation 4, the voltage divider resistors (R2 and R1) can be dimensioned and selected. Table 1 contains the corresponding values for each voltage level. Table 1. Final parameter values for every voltage level. Input Voltage R1 R2 Output Voltage 24 V 10 kΩ 5,9 kΩ 3,3 V 24 V 10 kΩ 3,24 kΩ 5 V 24 V 10 kΩ 1,1 kΩ 12,3 V 24 V 10 kΩ 887 Ω 15 V Figures 14 to 17 show the schematic circuit design for every output voltage. Each of them includes a Light Emitting Diode (LED) to visually identify when the circuit is working and a test point to manually being able to measure the voltage value once the PCB is manufactured. Pag. 38 Report Figure 14. 3,3V circuit schematic. Figure 15. 5V circuit schematic. Figure 16. 12V circuit schematic. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 39 Figure 17. 15V circuit schematic. Finally, some components require a reference voltage that does not correspond to any of the presented above. For these cases, the REF2030 voltage reference from Texas Instruments will be used. This chip can generate 1,5V and 3V stable references. Its schematic circuit design can be observed in Figure 18. Figure 18. REF2030 circuit schematic. Pag. 40 Report 4.4. Physical signals When riding the motorcycle, the rider must be able to control the amount of power needed at every instant. This action is performed by rotating the throttle potentiometer located on the right side of the handlebar. Furthermore, this particular prototype is equipped with a gearbox consisting of two gears. In order to change gears in a fast manner, an electronic component known as quickshifter is installed close to the left foot of the rider. In the following sections, both analog systems will be introduced and integrated onto the board. 4.4.1. Throttle Potentiometer The core component of the throttle is a potentiometer, which is a variable resistor. It consists of a resistive track with a wiper (a movable contact) that slides along the track. As the wiper moves, it changes the resistance between its connection points. The motorcycle is equipped with a Domino throttle potentiometer that has a switch to ensure when the throttle is engaged, and the resistance values oscillate between 0 and 5kΩ. Figure 19 illustrates the wiring diagram of the throttle. Figure 19. Throttle potentiometer wiring diagram. The system is powered at 5V, consequently the switch signal can be either 0V (disengaged) or 5V (engaged), whereas the throttle signal goes continuously from 0V (no throttle) up to 5V (full throttle). These values exceed the microcontroller’s ADC accepted range, so an adaptation circuit is required. Throttle signal will be converted to a differential signal to use the 16-bit ADC resolution, while the throttle switch will act as a comparator and output de op-amp supply voltage (3,3V) when it is engaged. Table 2 shows the chosen values for the throttle signal differential circuit and Figures 20 and 21 illustrate the throttle signal and switch circuit schematics respectively. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 41 Table 2. Throttle signal circuit parameters range (no throttle and full throttle). Vin- Vin+ R1 R2 R3 R4 Vout- Vout+ 0 V 0 V 56 kΩ 100 kΩ 56 kΩ 100 kΩ 1,5 V 1,5 V 0 V 5 V 56 kΩ 100 kΩ 56 kΩ 100 kΩ 0,1 V 2,9 V Figure 20. Throttle signal schematic. Figure 21. Throttle switch schematic. Pag. 48 Report 4.8. Communications Communications are necessary to share information between systems both inside and outside the ECU. Three different component systems will be installed on the PCB using different communication methods to store and/or send information. In the following subsections, they will receive a brief introduction. 4.8.1. Controller Area Network (CAN) Controller Area Network (CAN) has become an integral part of modern vehicle and industrial control systems due to its reliability, robustness, and efficient communication capabilities. CAN is a message-based communication protocol, meaning that devices communicate by sending discrete messages or frames over the network. Each frame contains both data and control information. It uses differential signalling, where the voltage difference between two wires CAN High (CAN_H) and CAN Low (CAN_L) represents the data. This makes it highly immune to electromagnetic interference (EMI) and noise. To connect the CAN bus network to the microcontroller, a transceiver is needed. The primary purpose of a CAN transceiver is to convert the digital signals generated by the CAN controller into differential voltage signals suitable for transmission over the CAN bus wires and vice versa. CAN allows the ECU to communicate with all other systems of the motorcycle such as the BMS or the user interface (dash) to send and receive information. Two different CAN channels will be installed. The chosen isolated CAN transceiver for this project is Texas Instruments’ ISO1050. On the transceiver side it is supplied with 5V and receives both CAN_H and CAN_L inputs, whereas the digital side is supplied with 3,3V and contains the transmit data input pin (TXD) and receive data output pin (RXD) that connect to the microcontroller. Moreover, to generate the isolated power supply, a transformer (760390015), transformer driver (SN6505) and a Low-Dropout regulator (LDO, TPS70950) are used. The complete CAN circuit schematic can be found in Figure 28. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 49 Figure 28. CAN circuit schematic. Pag. 50 Report 4.8.2. Serial Peripheral Interface SPI, which stands for Serial Peripheral Interface, is a widely used synchronous serial communication protocol in the field of embedded systems, microcontrollers, and digital electronics. It is a versatile communication standard that allows multiple peripheral devices to communicate with a central microcontroller or microprocessor. SPI is a synchronous communication protocol, meaning that data is transferred in sync with a clock signal. Both the sender (master) and receiver (slave) devices share a common clock signal, which ensures precise timing of data transfer. SPI typically requires only four signal lines: SCLK (Clock), MOSI (Master Out Slave In), MISO (Master In Slave Out), and CS (Chip Select) for each slave device. This will be the communication method between the microcontroller and an SD Card that will be installed on the board to be able to store data for safety and information purposes and access it if needed. The circuit schematic of the system is shown below. Figure 29. SD-Card SPI circuit schematic. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 51 4.8.3. Serial Communication Interfaces Serial Communication Interfaces (SCI) are hardware or software modules that facilitate the transfer of data between microcontrollers or between a microcontroller and external devices in a serial fashion, meaning one bit at a time. This will be the communication method between the TMS320F28379D main microcontroller and the ESP32WROOM32E, another microcontroller that will be installed on the ECU. The ESP32 opens a new spectrum of possibilities, but its main intended use is the ability to communicate wirelessly with external computers and smartphones. This allows to check the status of different parameters of the vehicle and to modify them without the need of being physically connected to the prototype. The ESP32 schematic circuit can be found below. Basically, only the power pins and transmit (TXD0) and receive (RXD0) data pins will be used for now. Figure 30. ESP-32 SPI circuit schematic. Pag. 52 Report 4.9. Current measurement In order to perform the current measurement for the motor closed loop control, it is necessary to know the currents of the three phases of the motor. However, thanks to the fact that the 3 intensities added together are zero, in practice it is only strictly necessary to measure the intensity of two phases. For the measurement of these intensities there are two possibilities: by means of shunts and by means of hall effect sensors. Currently, the motorcycle is equipped with shunts for all three phases and the signal obtention is made through the inverter driver PCB, so there is no need to take current measurement signal obtention into account for the ECU. Nonetheless, in case of a design change, it is always preferable to have extra features, so a circuit to obtain the current measurement signal of each phase through hall effect sensors has also been implemented. Figure 31 illustrates the circuit schematic. Figure 31. 3-phase current measurement differential signal schematic. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 53 4.10. Gate drive signals As seen in Figure 5, back in chapter 3, the controller must deal with the inverter driver’s gate signals. In this section, the different gate signals will be introduced. The ECU will be attached to each driver PCB by means of integrated connectors. Figure 32 illustrates the schematic of each one of the three phases connectors. Figure 32. Drivers’ connectors schematic. Inside the inverter, every motor phase contains two switches (top and bottom) that can either be “closed” or “opened”. Both switches cannot be in the same state at the same time, except there is a dead time when both are opened to prevent creating a short circuit by not letting enough time to one to open when the other closes. This gate signal is generated through Pulse Width Modulation (PWM), Figure 33 illustrates how it works for all three phases. It consists of a triangular waveform and the system generates a sinusoidal compare waveform. If the triangular waveform is below the sinusoidal one, the system outputs a “high state” (switch closes), and in the opposite case, the system outputs a “low” state (switch opens). Figure 33. PWM schematic. [1] Pag. 54 Report For every phase, the following signals are transmitted: - PWM_T: PWM of the top switch. - PWM_B: PWM of the bottom switch. - RDY: Ready, driver is ready. - FLT: Fault, driver fault detection. - PWM_RST: PWM Reset, driver system reset. - APWM_T: Analog PWM Top, inverter temperature measurement. - APWM_B: Analog PWM Bottom, voltage measurement. - SD_C: Sigma-Delta Clock, current measurement. - SD_D: Sigma-Delta Data, current measurement. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 55 4.11. Connectors With the intention of simplifying the design, the PCB will only contain four connectors (excluding the integrated connectors for the Launchpad and inverter driver PCBs): three central connectors and one for the current measurement in case of installing hall effect sensors. The three main connectors will take care of all the signals that need to enter or exit the ECU packaging, and they have been distributed as follows: one for the two CAN channels, another for the outputs and digital inputs, and the last one for the throttle, quickshifter and motor signals (sine, cosine, and temperature). The complete connectors’ schematic can be found below. Figure 34. ECU connectors schematic. Pag. 56 Report 4.11.1. LAUNCHXL-F28379D connectors The LAUNCHXL-F28379D has eight different connectors that are attached to the ECU PCB. The following figure illustrates all the signals that are sent between the microcontroller and the rest of the board. Figure 35. LAUNCHXL-F28379D connectors signals schematic. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 57 4.12. Clamping protection To wrap up all the systems that will be present in the board, an extra safety component has been added. To ensure that all ADC inputs never exceed the maximum permitted voltage, an array of TVS rail-to-rail diodes clamp every analog signal at 3,3V; that is, if for any reason one of these signals surpasses 3,3V, the diode clamps it and outputs 3,3V which is accepted by the microcontroller ADC and avoids any possible damage. Figure 36 illustrates the schematic of the clamping circuit. Figure 36. Analog signals clamping circuit schematic. Pag. 64 Report 7. Economic assessment This section lists all the hours spent on the project. It differentiates between the hours spent by an industrial engineer preparing research, design, implementation and drafting tasks. The PCB manufacturing costs are also detailed. Table 6. Human capital costs. Activity Hourly price Hours devoted Cost Research 20 €/h 50 h 1000 € Design 20 €/h 150 h 3000 € Implementation 20 €/h 250 h 5000 € Writing 20 €/h 100 h 2000 € TOTAL 11000 € Table 7. Manufacturing costs. Element Unit price Quantity Cost PCB Manufacturing 7,50 € 1 7,50 € Partial Assembly 75,73 € 1 75,73 € Extra components 65,04 € 1 65,04 € TOTAL 148,27 € Adding up the capital costs and material costs, the total cost of the project adds up to 11148,27 €. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 65 8. Environmental assessment This project was about developing an ECU for an electric racing motorcycle to push the boundaries of innovation and work towards a more sustainable world. Here are some key reasons highlighting the importance of electric vehicles: - Reduced Greenhouse Gas Emissions: EVs produce significantly fewer or zero tailpipe emissions compared to traditional internal combustion engine (ICE) vehicles. They help mitigate air pollution and reduce the carbon footprint, making them crucial in the fight against climate change. - Energy Efficiency: EVs are more energy-efficient than conventional vehicles. Electric motors convert a higher percentage of the energy from the grid into vehicle movement, reducing energy waste and overall resource consumption. - Reduced Noise Pollution: Electric vehicles are quieter than traditional vehicles, contributing to reduced noise pollution in urban areas, which can lead to improved quality of life for residents. - Diversified Energy Sources: EVs can be charged using various energy sources, including renewable energy such as wind, solar, and hydropower. This diversification reduces reliance on fossil fuels and enhances energy security. - Domestic Energy Production: Promoting EV adoption encourages countries to invest in domestic energy production, reducing dependence on imported oil and increasing energy self-sufficiency. - Health Benefits: Reduced tailpipe emissions from EVs lead to improved air quality, which has direct health benefits for individuals and communities. Lower levels of pollutants like nitrogen oxides (NOx) and particulate matter can reduce respiratory and cardiovascular diseases. Pag. 66 Report In conclusion, electric vehicles play a key role in addressing pressing global challenges, such as climate change, air pollution, energy security, and economic sustainability. Their importance extends beyond individual transportation, influencing various sectors of the economy and contributing to a more sustainable and environmentally friendly future. As technology continues to advance and EV infrastructure expands, their significance will only continue to grow. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 67 9. Social and gender equality assessment Every ETSEIB student is allowed to take part in the eRacing project to build an electric motorcycle regardless of gender or origin among others. Every team member is encouraged to give the best and the main motivation behind the project is to learn and grow as a human being and as an aspiring professional. Discriminatory behaviour is not allowed by any means. Pag. 68 Report 10. CONCLUSIONS In this project, a completely functional Electronic Control Unit for an electric racing motorcycle has been designed from the ground up, manufactured and tested. It can be assured that the main objective of the project has been reached. Furthermore, an introductory chapter regarding the electric motorcycle architecture has proportioned a clear vision of the components a motorcycle is equipped with and the elements that are responsible for the power delivery in the vehicle. Moreover, for every electronic system present on the ECU, a functionality description, component selection and schematic design has been detailed. This allows the reader to approach the design thinking process behind the decisions that have to be made in the project. Once all schematics have been finished, the complete design of the PCB has been made, dealing with how to obtain the best component placement, and simplifying trace routing. When the final design has been reached and all manufacturers’ guidelines have been followed, the board has been manufactured and the physical product has been received. This has allowed to conduct several tests to ensure the proper functioning of all systems inside the electronic board. To conclude, a compact and functional ECU will be installed in the motorcycle, but almost every project has a follow-up, so there is still room for improvement and innovation. The next phase of the project will be to fine tune the software in order to maximize the efficiency and potential of the product. Design, development, and optimization of an Electronic Control Unit for an electric racing motorcycle Pag. 69 11. Bibliography [1] IQBAL HUSAIN, Electric and Hybrid Vehicles, Design Fundamentals, Third edition. [2] MOTO ENGINEERING FOUNDATION, CIRCE MS2223, Datasheet. [3] TEXAS INSTRUMENTS, TMS320F28379D, Datasheet. [4] TEXAS INSTRUMENTS, LMP7715, Datasheet. [5] ANALOG DEVICES, AD8137, Datasheet. [6] TEXAS INSTRUMENTS, TPS5450, Datasheet. [7] TEXAS INSTRUMENTS, REF2030, Datasheet.