assignment.03_joy pandya

16
HW-3. Driver control, electric motor Model Based Design 6 Interoffice Memorandum TO : Dr. Antonio Gauchia FROM : Joy Pandya DATE : 11/7/2016 Subject: HW-3. Driver control, electric motor Model Based Design In this report, analysis of a formula E vehicle has been shown. Simulink has been used to develop model for LVD, Driver and battery. Findings from Simulink model has been called out to Matlab file and graphs have been plotted and discussed. Process To build a LVD (Linear Vehicle Dynamics) subsystem, we will require the data of Tractive force, Break force and slopes. I have generated vehicle speed and total resistances in output. To add driver control, we need targeted and actual vehicle speed as inputs and torque and break normalization in output. To make the vehicle hybrid, I have also considered electric motor to calculate tractive force and brake force. Finding The graphs between targeted and actual vehicle speed vs time, tractive force vs time and error (in %) in calculating vehicle speed vs time has been plotted using callback function of Simulink. Highest value of tractive force is 2673 N at 784.5 s and lowest is 0 at various point of times. The highest value of vehicle speed is 26.79 m/s at 1203 s and lowest is 0 at various point of times. Lastly, the highest percentage error in velocity is 4.59% at 763.3 s and 1543 s and lowest error is 0% at several point of times.

Upload: joy-pandya

Post on 05-Apr-2017

40 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

6

Interoffice Memorandum

TO : Dr. Antonio Gauchia

FROM : Joy Pandya

DATE : 11/7/2016

Subject: HW-3. Driver control, electric motor Model Based Design

In this report, analysis of a formula E vehicle has been shown. Simulink has been used to

develop model for LVD, Driver and battery. Findings from Simulink model has been called out to

Matlab file and graphs have been plotted and discussed.

Process

To build a LVD (Linear Vehicle Dynamics) subsystem, we will require the data of Tractive force,

Break force and slopes. I have generated vehicle speed and total resistances in output. To add

driver control, we need targeted and actual vehicle speed as inputs and torque and break

normalization in output. To make the vehicle hybrid, I have also considered electric motor to

calculate tractive force and brake force.

Finding

The graphs between targeted and actual vehicle speed vs time, tractive force vs time and error

(in %) in calculating vehicle speed vs time has been plotted using callback function of Simulink.

Highest value of tractive force is 2673 N at 784.5 s and lowest is 0 at various point of times. The

highest value of vehicle speed is 26.79 m/s at 1203 s and lowest is 0 at various point of times.

Lastly, the highest percentage error in velocity is 4.59% at 763.3 s and 1543 s and lowest error is

0% at several point of times.

Page 2: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

6

MEEM/EE 4295

Introduction to Propulsion Systems for Hybrid Electric

Vehicles

Michigan Tech

HW-3. Driver control, electric motor Model Based Design

Date: 11-07-2016

Student name: Joy Pandya

Page 3: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

2

1 Introduction

For all 8 questions, calculation has been done in Matlab and Model has been generated in

Simulink. I have provided screenshots of the script and model under specific question. I have

also provided detailed explanation of each and every sub-system. Final code is also available in

Appendix. In question 6, I have worked with PID controller to minimize the error between

targeted and actual vehicle speed. I have tried with various values of P, I and D and finally

settled with values 1, 1 and 0 which gives me 0% error in almost entire Highway drive cycle. I

have also changed the adherence coefficient to 0.2 to see the effect of adherence coefficient on

tractive force. Plot has been generated and result has been discussed.

2 Question 1: Subsystem for Longitudinal Vehicle Dynamics (LVD):

LVD model has been developed in Simulink. Before generating the model, I have written code in

Matlab asking user to select test slope conditions, vehicle drive and drive cycle. I have coded

the script in such a way that according to the selection of the user, different equation would be

used for calculating maximum adherence force. Following screenshots show the choice menu.

Figure 1: Menu for selecting drive cycle

Page 4: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

3

Figure 2: Menu for selecting test slope condition

Figure 3: Menu for selecting vehicle drive

Following screenshot shows the Simulink model for LVD and vehicle resistances. In this model, I

am summing up the tractive and brake force and subtracting total resistances. By doing this, I

can get overall force acting on the vehicle. And that for will equal to mass times acceleration.

Now if we divide overall force by vehicle mass and integrate the remaining value, we will be

able to get actual vehicle speed. I have given output for saturated and un-saturated tractive

force.

Figure 4: Vehicle speed calculation through tractive force

Page 5: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

4

This vehicle speed with be the input for calculating drag resistance. Simulink model for

calculating total resistances is shown below. It is pretty much self-explanatory.

Figure 5: Total resistance calculation

3 Question 2: Modelling of driver controller:

Driver controller is modelled to give comparison between actual and targeted vehicle speed.

We give the difference between targeted speed and actual speed to PID and manually controls

variables P, I and D to minimize the difference. After many iterations, I have selected values 1, 1

and 0 for P, I and D respectively and I am getting almost 0% error during majority of the drive

cycle. Then I have saturated the output of PID controller to get the values for torque request

normalized and Brake request normalized. The model is shown in figure: 6.

Page 6: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

5

Figure 6: Modelling driver control in Simulink

4 Question 3: Modelling of E-drive motor:

I have fetched data for motor torque and power vs. motor speed from ‘Power Phase 150 kW

traction electric motor specs manufactured by UQM’. I have used those data to calculate

Traction force and brake force. Model is pretty self-explanatory and shown in Figure: 7.

Figure 7:Modelling electric motor in Simulink

Page 7: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

6

5 Question 4: Overall Simulink model:

Figure 8: Overall Simulink model

Page 8: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

7

I have explained resistances and LVD, driver and Electric motor in sections 2, 3 and 4

respectively. Here I am explaining input parameters block.

Figure 9: Input parameters block in Simulink modelling

Here as an input I have introduced clock. Then two 1 – D lookup tables (speed vs time and slope

vs time) has been introduced. Gain factor has been introduced to convert values from miles per

hour to m/s and radian to degree. Finally output values have been stored in Target_speed and

slope respectively.

Page 9: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

8

6 Question 6: PID control for different drive cycles:

Figure: 10 shows the graph between actual vehicle speed vs time and targeted vehicle speed vs

time for highway cycle (HWFET_Cycle.mat), on single graph.

Figure 10: Targeted and actual vehicle speed vs time for front wheel drive vehicle in highway test

From the graph we can see that actual vehicle speed exactly overlaps on the targeted vehicle

speed. I have taken PID values as 1, 1 and 0 for P, I and D respectively. For choosing the values I

have kept values of I and D constant and I changed P so that I can know the effect of an

individual parameter on plot. I did the same with all 3 parameters. And after understanding the

relation of individual parameters on curve shape, I iterated and finalized the values 1, 1 and 0.

Page 10: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

8

Figure: 11 shows the plot between relative error in percentage vs time. From this plot we can

see that for most of the times, PID works very well and actual velocity curve traces the targeted

velocity curve.

Figure 11: Percentage velocity error vs time for front wheel drive vehicle in highway test

We can also see that error increases when there is very high change in velocity, that means in

high acceleration cases error tends to increase. Maximum error is 4.59% at 763.3 s and 1543 s.

From figure:10 we can see that at this time change in velocity is also very high.

Figure: 12 and figure: 13 shows the same exercise for different drive cycle. This time I have

selected performance test instead of highway test, I have selected slope pattern ‘others’

instead of horizontal pavement and I have selected 4-wheel drive instead of front drive. So, I

have pretty much changed all vehicle running conditions.

Page 11: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

8

Figure 12: Velocity profile for 4 WD vehicle in performance test

Figure 13: Percentage velocity error vs time for 4 WD vehicle in performance test

Page 12: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

8

For the same values of PID, error should not vary if we change conditions. And plots suggest the

same thing. In this case the maximum error is 1.89% at 1 s and then majority of the time, error

is 0%.

7 Question 7: Tractive force vs time for highway cycle:

Figure: 14 shows the plot between tractive force (N) vs time (s) for highway cycle. I have plotted

the graph with adherence coefficient value 0.2 and 0.8. Maximum value of tractive force is

2673 N at 784.5 s.

Figure 14: Tractive force vs time

Page 13: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

8

8 Question 8: Tractive force vs time for highway cycle:

For adherence value 0.2, graph of saturated and non-saturated tractive force is shown in figure: 15.

Figure 15: Unsaturated vs Saturated tractive force

The value for saturated tractive force is either 0 or 1. We can see that in term od red columns.

While unsaturated tractive force has continuous values. Saturated tractive force only shows

whether the value of tractive force is above certain limit or not. It does not show the value of

tractive force.

Page 14: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

8

9 Appendix A: Matlab code ‘Initial_Parameters.m’:

W = 16000; % Vehicle weight [N] g = 9.8; % m/s2 m = W/g; % Vehicle mass [kg] L = 3.04; % Wheel base [m] l1 = 1.4; % Distance to front tire from COG [m] l2 = L - l1; % Distance to rear tire from COG [m] R_wheel = 0.410; % Tire radius [m] h = 0.450; % Height to COG from ground [m] fr = 0.016; % Rolling resistance coefficient Cd = 0.44; % Drag coefficient A = 2.7; % Cross sectional area [m2] rho = 1.224; % Air density [kg/m3] Nd = 3.08; % Final Differential Ratio Nem = 2.5; % E-Motor Gear Ratio mu = 0.8; % Coefficient of friction between the pavement and the

tire

N_motor = [0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000]; %

Motor speed [rpm] T_motor = [650, 650, 650, 590, 540, 490, 450, 410, 365, 315, 280];

% Motor torque [Nm]

choice = menu('Select test slope condition',... 'Horizontal slope (slope = 0 [deg])',... 'Constant slope of 2 [deg]',... 'Other'); if choice == 1; load ('Horizontal_slope.mat'); elseif choice == 2; load ('Slope_2degrees.mat'); elseif choice == 3; load ('Other.mat'); end;

choice = menu('Select Vehicle Drive', ... 'Front Drive',... 'Rear Drive', ... '4 Wheel-Drive');

if choice==1 Fmax_adh=mu*W*(l2+(h*fr))/(L+(mu*h)); elseif choice ==2 Fmax_adh=mu*W*(l1-(h*fr))/(L-(mu*h)); elseif choice==3 Fmax_adh=mu*W; end

choice = menu('Select Drive cycle',... 'Constant_Speed_Points_Cycle',... 'ECE_15_Cycle',... 'EUDC_Cycle',... 'HWFET_Cycle',...

Page 15: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

8

'Performance_Test',... 'UDDS_Cycle',... 'US06_Cycle'); if choice == 1; load ('Constant_Speed_Points_Cycle.mat'); elseif choice == 2; load ('ECE_15_Cycle.mat'); elseif choice == 3; load ('EUDC_Cycle.mat'); elseif choice == 4; load ('HWFET_Cycle.mat'); elseif choice == 5; load ('Performance_Test.mat'); elseif choice == 6; load ('UDDS_Cycle.mat'); elseif choice == 7; load ('US06_Cycle.mat'); end;

v = TEST_CYCLE (:,2); % Vehicle speed [mph] t = TEST_CYCLE (:,1); % time [s]

Appendix B: Matlab code for plotting; ‘graphs.m’:

figure(1) [h0,h1,h2]= plotyy(t_out,input,t_out,actual); set(h1,'linewidth',[2]); set(h2,'linewidth',[2]); xlabel('Time (s)'); ylabel(h0(1),'Target Vehicle Speed (m/s)'); ylabel(h0(2),'Actual Vehicle Speed (m/s)'); set(h0(2),'YLim',[0 30]); legend('Target Vehicle Speed','Actual Vehicle Speed'); title('Target vs Actual Vehicle Speed'); grid minor;

figure(2)

hold all m1=plot(t_out,tractive_forces_S); t1=plot(t_out,tractive_forces,'--'); set(m1,'linewidth',[2]); xlabel('Time (s)'); ylabel('Tractive Forces (N)'); legend('Tractive Forces (µ = 0.2) (N)','Tractive Forces (µ = 0.8)

(N)'); title('Tractive Forces v/s Time'); grid minor; hold off

figure(3)

t2=plot(t_out,percentage_error); set(t2,'linewidth',[2]); xlabel('Time (s)');

Page 16: Assignment.03_Joy Pandya

HW-3. Driver control, electric motor Model Based Design

8

ylabel('Percentage Velocity Error (%)'); axis([0,t(end),-10,10]); legend('Percentage Velocity Error'); title('Percentage Velocity Error v/s Time'); grid minor;

figure(4)

[h0,h1,h2]= plotyy(t_out,tractive_forces,t_out,tractive_forces_S); set(h1,'linewidth',[2]); set(h2,'linewidth',[2]); xlabel('Time (s)'); ylabel(h0(1),'Unsaturated tractive force (N)'); ylabel(h0(2),'Saturated tractive force (N)'); set(h0(2),'YLim',[0 30]); legend('Unsaturated tractive force','Saturated tractive force'); title('Unsaturated vs Saturated tractive force'); grid minor; grid on;