How can I calculate the average power from a driving cycle using Matlab?

In summary: CD = Coefficient of drag (0.29) Af = Air friction coefficient (0.5) T = Time (s)So, in order to calculate the power required, I would use the equation below,P = Ft * M * g * CD * Af * T
  • #1
pchoopanya
25
0
Hello,

I need to work out the average load power which is expressed by the equation attached;

I am not sure about how I can do this, I am so dumb at calculus.

M, g, fr, [tex]\rho[/tex], CD, Af, [tex]\delta[/tex] and T are one single constant

However, V which stands for velocity varies with time, T or t and its values are formed into a matrix

How can I perform this finite integration? Which command do I need?

---------------------------------------------------------------------------------------

Or, shall I just plot the graph of power, P against time, t and use the command, like trap to find the area under the curve since I have an array of V against t (V cannot be expressed as a function of t)

I think I am lost as I have not touched calculus for very long long time.



Thank you for your help guys.
 
Physics news on Phys.org
  • #2
pchoopanya said:
Hello,

I need to work out the average load power which is expressed by the equation attached;

I am not sure about how I can do this, I am so dumb at calculus.

M, g, fr, [tex]\rho[/tex], CD, Af, [tex]\delta[/tex] and T are one single constant

However, V which stands for velocity varies with time, T or t and its values are formed into a matrix

How can I perform this finite integration? Which command do I need?

---------------------------------------------------------------------------------------

Or, shall I just plot the graph of power, P against time, t and use the command, like trap to find the area under the curve since I have an array of V against t (V cannot be expressed as a function of t)

I think I am lost as I have not touched calculus for very long long time.



Thank you for your help guys.

I don't think your equation attachment worked. Could you please try again?
 
  • #3
Hi,

thank you for telling me

Here again.
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    6.5 KB · Views: 321
  • #4
I will show you the power plot against time

As you can see the power curve does not have a pattern at all
 

Attachments

  • Untitled-2.jpg
    Untitled-2.jpg
    32.3 KB · Views: 294
  • #5
My apology,

I have re-arranged my questions so that you guys can see more easily what actually I am trying to do;

Please see the attached picture;

These are 4 examples of 4 different drive cycles (vehicle speed VS time)

From that, using simple longitudinal linear dynamic equation, I then obtained a plot of tractive force against time. Finally, to convert force into power, simply multiply by a velocity.

Note that, only the data of velocity at each time interval is known (as a metrix)

However, I also need to know what the average power is, in order to properly size the engine/fuel cell, I have been given the above equation which involves integration.

My question is, how can I obtain the average power as shown in the picture?

Thank you very much again.
 

Attachments

  • Untitled-3.jpg
    Untitled-3.jpg
    55.2 KB · Views: 330
  • #6
pchoopanya said:
My apology,

I have re-arranged my questions so that you guys can see more easily what actually I am trying to do;

Please see the attached picture;

These are 4 examples of 4 different drive cycles (vehicle speed VS time)

From that, using simple longitudinal linear dynamic equation, I then obtained a plot of tractive force against time. Finally, to convert force into power, simply multiply by a velocity.

Note that, only the data of velocity at each time interval is known (as a metrix)

However, I also need to know what the average power is, in order to properly size the engine/fuel cell, I have been given the above equation which involves integration.

My question is, how can I obtain the average power as shown in the picture?

Thank you very much again.

Thank you for the extra details. But of course power cannot be negative in the context of this question. How should you modify your calculations so far to fix this?
 
  • #7
berkeman said:
Thank you for the extra details. But of course power cannot be negative in the context of this question. How should you modify your calculations so far to fix this?

Unless you are using some regenerative braking recovery of energy in your calculations -- apologies that it is not clear to me.
 
  • #8
Morning from UK berkeman,

Well, the reason why the power is negative comes from the attached equation,

By knowing a specific driving cycle (velocity profile against time), in this case, I'm using a Bangkok drive cycle (Thailand), the remaining variables are already known, I could then work out the Tractive Force required at wheel in order for the vehicle to follow the drive pattern.

Where Ft = Tractive effort (N)
M = Bus mass (18000 kg)
g = gravitational accel. (9.81 m/s^2)
f r = rolling resistance coefficient (0.015)
[tex]\alpha[/tex] = road gradient (0 degree, flat road)
[tex]\rho[/tex]a = air density (1.146 kg/m^3 at 35 C in Bangkok)
CD = Drag coefficient (0.8)
Af = frontal area (7.8 m^2)
V = vehicle speed (m/s)
[tex]\delta[/tex] = mass factor due to rotating components, such as gears, wheels etc. (1.035)
t = time in seconds

The first term of the right hand side = tractive effort to overcome rolling resistance
The second term of the right hand side = tractive effort to overcome aerodynamic resistance
The third term of the right hand side = tractive effort to accelerate the vehicle mass

The spreedsheet is also attached to show the calculation together with the graphs, you can see that I did not include any Re-gen brake ability, but I believe the negative power is just a result from the negative values of the third term on the right hand side (effort to accelerate the mass), which is a result of negative dV/dt

I do not quite understand what this actually means by the NEGATIVE power in some parts of the plot. How can power be negative? Can anyone help? please.

Most important, how can I find the AVERAGE power from this? So that I could determine the appropriate size of engine/fuel cell. If this is to use the above integral equation, how can I do this?

Thank you very much
 

Attachments

  • Untitled-4.jpg
    Untitled-4.jpg
    6.9 KB · Views: 161
  • BDC.zip
    125.6 KB · Views: 192

1. What is integration and why is it important?

Integration is a mathematical process that involves finding the area under a curve. It is important because it allows us to solve problems related to finding distances, volumes, and other quantities in real-world applications.

2. How can I perform integration using Matlab?

Matlab has built-in functions for integration, such as trapz and quad. These functions can be used to numerically integrate a function over a specified interval. Alternatively, you can also use the symbolic toolbox in Matlab to perform symbolic integration.

3. Can I customize the integration method in Matlab?

Yes, Matlab allows you to specify the integration method to use, such as 'simpson' or 'gauss', for more accurate results. You can also adjust the tolerance level to control the accuracy of the integration.

4. How can I plot the integrated function in Matlab?

After performing integration, you can use the plot function in Matlab to plot the integrated function. You can also use the fplot function to plot the integrated function over a specified interval.

5. Are there any limitations to integration using Matlab?

Yes, there are limitations to integration using Matlab. For complex integrals or integrals with singularities, the numerical integration methods in Matlab may not give accurate results. In such cases, it is recommended to use the symbolic toolbox or other specialized software for integration.

Similar threads

  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • Advanced Physics Homework Help
Replies
6
Views
2K
  • Introductory Physics Homework Help
Replies
5
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
969
  • Electrical Engineering
Replies
4
Views
727
  • Calculus and Beyond Homework Help
Replies
10
Views
998
  • Electrical Engineering
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
11
Views
2K
Replies
2
Views
799
Back
Top