Voltage Control of a Generator for a Hybrid Vehicle Prototype

The automotive market is currently dominated by internal combustion engine vehicles, which use non-renewable energy sources emitting greenhouse gases into the atmosphere. Hybrid cars are emerging as a sustainable alternative to minimize the problem, while waiting for futuristic solutions as solar or hydrogen vehicles. In this study, an electric energy generator prototype for a hybrid vehicle is developed, focusing on the voltage control at the generator terminals. Initially, the possible opening angles of the carburetor valve of an internal combustion engine, controlled by a servomotor, were mapped, followed by open-loop tests. This concept resulted in the identification of the system parameters, which were applied to the MATLAB software for the implementation of the PI controller, responsible for a closed-loop control of the air-fuel mixture that feeds the engine. Thus, the rotation of the shaft coupled to the generator remains almost fixed, reducing the generated voltage fluctuation, allowing safely storage of the energy that will be used to drive the vehicle wheels.


INTRODUCTION
Hybrid Electric Vehicles (HEV) are a category of vehicles that have been developed as an alternative to replace, even if just partially, conventional automobiles fuelled by non-renewable sources (as gasoline, diesel).Hybrid vehicles use two, or even more, energy sources to provide the necessary traction to move, with the most common configuration being based on internal combustion engines (ICE) associated with electric motors [1,2].
Several reasons have led the automobile industry to develop vehicles that use multiple sources of energy.Among them, the perception that oil is not an infinite resource and the increasing pressure from governments to reduce the emission of pollutants can be cited [3].
The increase in fuel prices and its growing consumption have also led to the research of electric vehicles and hybrid electric vehicles [4].
Since a useful technology for vehicles powered solely by electric sources has not yet reached a satisfactory level for large-scale production and quality [5,6], while solar and hydrogen cars remain at level of prototypes, hybrid vehicles seem to represent the most viable solution at the present.In particular, hybrid vehicles can benefit from the combination of their different power-trains.Hybrid vehicles may have greater autonomy respect to the fully electric cars, thanks to the internal combustion energy source [7,8] and better performance (e.g.acceleration, energy efficiency) respect to the conventional cars, thanks to efficient and fast reacting electric motors.
Due to the presence of two or more energy sources, there are several configurations that can be applied, resulting in different characteristics and performances.And the biggest challenge for the development of hybrid vehicles is to manage these various sources and the other elements necessary for their operation.So it is needed to implement a system that performs the energy flow management [7,8].
An important part of this energy flow management is to establish well-defined parameters for charging the battery, which is the main source of HEV power.A battery requires voltage and current values within certain limits so that it is recharged without danger of overheating and without shortening its life [9].Therefore, in this work an electric power generator set, to be used in a small scale hybrid vehicle, was developed.In order for a lithium battery be recharged from this generator in the future, a closed-loop control system was implemented to obtain the generated voltage with stable values.

GENERATOR AND CONTROLLER DESIGN
To achieve the objective defined for this work of developing the control system of an electric power generator for a hybrid electric vehicle, a planning was done according to the steps below: • Project of the electric power generator system; • Assembly of the electric power generator system; • Development of the generator voltage control system; • Control system adjustment; • Generator test with load.

Project Characteristics
It was defined that for this project a hybrid vehicle would be used in the series configuration, due to the greater simplicity of the assembly, mainly due to the non-necessity of mechanical coupling between the electric motor and the internal combustion engine.In addition, the possibility of using a less powerful combustion engine that burns less fuel, always operating at a higher efficiency point, are good points when considering the environmental issues involved.
The Fig. 1 shows the schematic of the assembly and connection of the main components that will constitute the prototype of the generating set of the vehicle.The fuel tank feeds the combustion engine, which converts the chemical energy of the fuel into mechanical energy through its piston.The residual combustion gases are directed to the exhaust, causing a pressure difference in the interior that is responsible for forcing the fuel from inside the tank to the engine.The coupling connects the internal combustion engine to the electric generator, where the mechanical energy transforms into electrical energy.The microcontroller analyses the generated voltage and controls the servomotor in order to adjust the internal combustion engine speed.The internal combustion engine used in this project is a single-cylinder two-stroke from Team Associated, model VX.18.It uses nitromethane mixed with lubricating oil as fuel.It has a displacement of 2.74 cm³ and can reach up to 32000 rpm of rotation and 1.3 hp of power.The heat required for combustion is provided by a 1.0 V battery, which is continuously activated during the engine operation [10,11].
For electric energy generation from the rotation axis of the ICE, an electric DC motor, model MMI-6S9RK, was selected.Operating as a motor, it is driven by a 9 V power supply.
In addition, an E3003 servomotor with 180º of rotation capacity and an Arduino Nano v3.0, with ATmega328 Atmel microcontroller also were used.

Electronic circuit design
The design of the electrical/electronic circuit was made according to the Fig. 2. The voltage of the generator is read indirectly by the A1 pin of the microcontroller from a voltage divider.Since the maximum input voltage in the analog-digital converter of the Arduino is 5 V, a 1:7.6 voltage divider has been chosen.Therefore, 38 V voltage peaks could be read without damaging the microcontroller.The servomotor receives the pulse width modulated (PWM) input signal from the microcontroller D6 pin and it is powered by an external 5 V source.This source also powers a relay module, which is used to activate a DC motor as external load.The relay module is driven by the Arduino's D3 pin.

Figure 2. Electronic circuit scheme
The generated voltage value is calculated by (1), where v A1 is the voltage read by the microcontroller.

7.6
The writeMicroseconds() function from Arduino's Servo.hlibrary allows to send a PWM signal to an output pin from the value of the pulse width in µs.For the servomotor E3003, the pulse width value must vary between 700 and 2300 µs.

System modelling
The generator set system can be modeled from the block diagram shown in Fig. 3.Each rectangle represents one of the subsytems in the set: servomotor, carburetor valve, internal combustion engine, mechanical coupling, and generator.The servomotor receives the PWM input signal u(t), where the pulse width defines the servomotor shaft angle θ s (t).A rod is connected to the servomotor and the carburetor valve, which determines the fuel mass m F (t) entering in the ICE.The torque T(t) of the engine causes the coupling and the generator shaft to rotate at an angular velocity ( ) is the output variable of this system.The modeling of the subsystems is done considering each of them as an ideal system, in addition to disregarding the nonlinearities, inefficiencies or dependence of other variables, other than the input variable of the subsystem.
The formulas ( 2), ( 3), ( 4), ( 5) and ( 6) show the equations of each subsystem in the time domain, where k S , k V , k E and k G are the proportionality constants of the servomotor, carburetor valve, internal combustion engine, and generator, respectively.J is the moment of inertia of the whole set consisting of the engine shaft, the mechanical coupling and the generetor shaft, while D is the viscous friction coeficient between the shafts and bearings [12,13].
( ) ( ) To obtain the transfer function, the above equations must be transformed to the frequency domain through the Laplace transform.With the transformation of the equations and the substitutions, the transfer function of the output V G (s) can be found in relation to the input U(s), as shown in (7).

Controller design
Due to the difficulty in determining each of the parameters described in (7) precisely, the identification of these values must be made from an estimate.MATLAB System Identification Toolbox is a tool that provides functions that determine mathematical models of dynamic systems from input and output data measured in this system [14].After importing and preprocessing data, the model estimate can be done.For the model of the generetor set system, the transfer function is estimated for a first-order system with one pole and no zeros, as indicated in (7) obtained from the simplified equations of the subsystems.
A proportional-integral (PI) controller must be implemented to control the generated voltage to a predetermined reference value.Fig. 4 shows the block diagram of the closed-loop controlled system.The equation of the PI controller must be entered in the Arduino code to act in the servomotor position control.The input value u(t) can be calculed through (8), where k p is the proportional gain and k i is the integral gain.The error e(t) is defined as the difference between the reference voltage V ref and the generated voltage v G (t), according to ( 9).An offset of 700 µs is required as it is the smallest pulse width value to determine the angular position of the servomotor.The maximum value for the servo motor PWM input must also be limited, as high values may exceed the largest possible opening for the carburetor valve.Or, yet, accelerate the engine to speeds that exceed the capacity of the generator.Thus, it is defined as 850 µs The maximum value for the PWM input .
( ) ( ) ( ) The definition of the parameters and is done through the pidtool() function of the MATLAB Control System Toolbox.Taking the system transfer function as the input parameter, this function calculates the controller gains so that a given response behavior is obtained.As a standard, MATLAB uses a transient response for a step input with a 6.08% overshoot.
With the electric generator set system for a smallscale hybrid electric vehicle and its fully assembled data acquisition and control system, the final tests must be carried out.It is important to verify the correct actuation of the controller so that the desired reference voltage is reached.In addition, the voltage generated by the system must be used to operate an external load, verifying the ability to control the voltage either with the open-loop generator or by operating a DC motor.

RESULTS AND ANALYSIS
Fig. 5 shows how the components were assembled according to the design described in Fig. 1.The combustion engine 1 has its shaft connected to the shaft of the electric generator 2 through the aluminum coupling.The servomotor 3 has a rod attached to the carburetor valve, allowing adjustment of greater or lesser amount of the air-fuel mixture into the engine cylinder.The tank 4 supplies fuel to the engine through a flexible tube.The gases resulting from the combustion are expelled by the exhaust pipe 5, which is also connected to the fuel tank, providing the pressure necessary for the fuel to flow to the engine.Fig. 6 shows the assembly of the electronic components, according to the design described in Fig. 2. The terminals of the generator 1 are connected to the voltage divider 2, which is composed of three resistors, through a printed circuit in the lower part of the phenolite plate.The microcontroller 3 sends signals to the servomotor 4 and to the relay module 6 through the soldered connectors on the board.The external voltage source 5 is used to power the servomotor and the relay module.A DC motor 7 is used as an external load, connected to the relay module and to the generator.Both components of the mechanical assembly and of the electronic circuit were fixed in flat acrylic plates through screws, nuts and clamps.The assembly of the mechanical and electrical/electronic systems were carried out as designed for the small scale generator set.The system worked satisfactorily, ensuring the generation of DC power at the generator terminals.However, due to external noises in the data acquisition system, the voltage value generated showed considerable fluctuations for a constant opening of the carburetor valve.The excessive vibration of the set, as well as the system's own non-linear dynamics, also contributed to obtain a variable result.To reduce the effects caused by noise, a moving average digital filter was implemented in Arduino's data acquisition program with an average of 24 values.
Another negative point observed with the operation of the generator set, assembled in this work, is related to the efficiency in the generation of energy and with emissions of greenhouse gases.Because the engine is a two-stroke internal combustion fueled with nitromethane, the percentage of unburnt fuel in the combustion chamber is high.These particles, in addition to contributing to the pollution of the atmosphere, are also dangerous to human health.And part of the energy that could be produced by the internal combustion engine is not generated due to the incomplete combustion of nitromethane.Other factors contributing to the reduction of system efficiency are loss of heat to the environment due to heating of the components, slippage in the coupling between the engine and generator shafts, and vibration.

Initial tests
The first test was performed with the preset PWM input values into the servomotor, keeping the external load deactivated, in order to verify the operation of the generator without actuation of the control system.Fig. 7 shows the voltage at the open generator and the PWM input of the servomotor.

Figure 7. PWM input and generated voltage
Although the modeling performed shows a firstorder system, the data obtained shows a variation of the output, even when the input was kept constant.In the modeling of the generator set, several subsystems were considered ideal, but the real system presents several nonlinearities, such as the variation of the combustion engine efficiency with the rotation and the nonlinearity of the generator.Variable energy losses, such as vibration and heat yielded to the external environment, also contribute to the change of the energy generated with the passage of time.
With these initial graphs it is also possible to obtain an estimate of the maximum voltage values, with the open-loop generator.Voltage spikes of almost 16 V were obtained for a fixed value of the PWM input of 800 µs, while for the smallest possible value for the input of 700 µs values were registered slightly higher than 12 V.
The identification of the parameters of the system was carried out, resulting in the values shown in (10) of the transfer function of the estimated first-order model.Fig. 8 shows the generated voltage output values measured and estimated by the model.For the correct identification of the parameters of the modeled system, it was necessary to perform the pre-processing of the data, including a detrend process, so that the data have a null mean value.In addition, the first two seconds of the test were neglected due to the system's transient response.

Final tests
From the estimated system transfer function, the MATLAB function pidtool() determined the proportional k p and integral k i gains values, for a step response of the system with 6.08% overshoot, as shown in table 1. Initially the voltage control test was performed with the generator open, that is, with no load, and only with the proportional (P) controller, with k i = 0.In the first 15 s, the reference voltage was set at 12 V, while in the remaining period of the test it was set at 13 V.In this test, two different reference voltage values were used, and the controller acted so that the generated voltage was closer to the desired value.As a result, the system response showed a large percent overshoot in the first few seconds.In addition, the variation around the reference value was greater than 1 V.
A second test was also performed only with the proportional controller, but this time with the activation of an external load.The 5 V DC motor used as external load was activated by the relay module at 20 s.Due the great voltage drop induced by the load, the reference voltage was reduced to 5 V after 23 s.The result was similar to that obtained with the open generator, with the generated voltage variations greater than 1 V around the reference values.However, with the activation of the external load, the generator voltage dropped dramatically.This occurs because of the consumption of the generated power by the DC motor in form of electric current.For this load, the generated voltage dropped to values of the order of 8 V, even with the carburetor valve of the ICE at the maximum allowed opening.Then, the reference voltage was reduced to 5 V and the system was controlled around this value.Again, considerable variations were observed for the output voltage.
Finally, the test with the proportional-integral controller was performed, with the gains values according to the table 1.For this test, the reference voltage was set at 12 V with the generator open and, after 15 s, established at 4.5 V at the same time the external load was activated.At first, it is possible to verify a reduction in the percent overshoot in the first seconds.Using the PI controller, the maximum voltage value measured was approximately 14 V, while values greater than 16 V were measured for the proportional controller.For the reference voltage of 12 V the system output variation was approximately 1 V, while for the activated external load period, this fluctuation was just 0,5 V. Overall, the system presented less instability, mainly with the load activated.Thus, the proportional-integral controller presented better performance, compared to the proportional only controller.

DISCUSSION AND CONCLUSION
The main objective of this work was to develop a electric energy generation system for a hybrid electric vehicle prototype, with emphasis in the generated voltage control.Through studies about the existing HEV and its configurations, the theoretical means necessary to achieve this objective were acquired.
The microcontroller used in the investigation was able to read the output voltage of the generator and to command the actuator so that it controls the carburetor valve opening.Thus, the air-fuel mixture amount entering in the internal combustion engine, which determines the rotation of the shaft of the set, consequently the generated electric energy.
The system modeling and parameters identification through MATLAB was efficient, since the obtained results were close to the values of the estimated model.The real system variations were primarily due to the dependence of the output on several factors, such as temperature and vibration, which are variants in time.
Among the different controllers used, the proportional-integral controller got the best results for the system response.Its implementation in the generator set presented a satisfactory performance, considering that it was able to lead to the necessary rotation to obtain voltages values close to the desired voltage, with or without the external load, in a relatively short time interval.
Thus, despite the system imperfections, it was able to control the generator output voltage, keeping it at a relatively constant value, and then it would be able to charge a battery.In this way, it can be concluded that the experiment carried out was able to fulfil all the pretended objectives satisfactorily.
As future work, it is suggested the acquisition of more suitable components for this project, such as a four-stroke engine, which would reduce the gases emissions and increase the system efficiency; also, the acquisition of a more robust generator and a transmission system, allowing lower rotations for the system operation; a more in-depth study on vibrations, reducing the generated voltage values variation.
Another aspect of controlling that maybe deserves to be carefully investigated for the potential impacts on the overall functionality of these systems, as highligthed in [15], is the delays occur between the registration of an event and the moment the system is ready to react.These elapsed time is a sum of other elementary delays as in trasmission of signals, in their elaboration, etc.
In addition to all of this, advanced solutions for voltage control in hybrid vehicle could be properly obtained implementing a battery powered by the generator and supplying the necessary power for the electric motors connected to the vehicle wheels.
Finally, it is also noteworthy to highlight how hybrid cars could largely benefit from importing design methodologies and technical solutions from solar vehicles.In this competitive segment, in fact, the approach to the energy efficiency is not limited to single developments, but involves an overall strategy [16][17][18].

Figure 6 .
Figure 6.Electronic system assembly Figure 8.Estimated model Fig 9 show the obtained result at the generator output voltage in relation to the reference voltage.

Figure 9 .
Figure 9. Generated voltage without load and P controller Fig 10.  shows the obtained result for the generated voltage in relation to the reference voltage.

Figure 10 .
Figure 10.Generated voltage with load and P controller Fig 11 and 12  show the results for the generated voltage and the control signal for the servomotor, respectively.

Figure 11 .Figure 12 .
Figure 11.Generated voltage with load and PI controller