Velocity calculation in Range and Power Prediction Model

All that has to do with the power train, gearbox, clutch, fuels and lubricants, etc. Generally the mechanical side of Formula One.
Post Reply
User avatar
Roni
0
Joined: 20 Feb 2016, 16:26

Velocity calculation in Range and Power Prediction Model

Post

What am I working on: I have been working on a Matlab Simulink Simulation Model for EVs which calculates the power consumption for any given Drive Cycle (Velocity Vs Time Plots).
How does the model work: The model works calculating the error difference between the given velocity and the model and PID closes the gap using by adjusting the Accelerator Pedal Position which delivers Torque using the equations: (APP% x Max Possible Power)/Motor Angular Speed in Rads. This Torque (multiplied by the Gear Ratio) provides the Traction Force at wheels to overcome inertia, Aero Drag, Rolling Resistance and Gradient (if any). After summing up the positive traction force and Negative resistance force, the left over force is considered to pull the car forward. Dividing the force with the Inertial mass, gives us the acceleration and velocity is then calculated by integrating the acceleration. This velocity is then returned to be compared with the initial drive cycle in the PID control setup. Further integration of the Velocity also gives us the position (Hence range). The angular speed is also calculated from this velocity using Velocity = Angular Speed x Radius. Also I have ensured that the angular speed doesnt cross a particular limit, considering the RPM limit in Motors.
What is the issue: The calculated velocity doesnt seem to be correct considering the fact that every time I increase my gear ratios, top speed seems to increase which actually would bring down my top speed instead. Also these velocities do not seem to consider the RPM limit setup and only considers higher acceleration due to increased torque and hence higher speed.

What am I missing ??! : *your turn*
Speed has never killed anyone. Suddenly becoming stationary, that's what gets you.
-Jeremy Clarkson

Greg Locock
233
Joined: 30 Jun 2012, 00:48

Re: Velocity calculation in Range and Power Prediction Model

Post

For a range estimate much of that seems overelaborate. I don't understand your angular velocity bit, what radius?

I suggest you plot vehicle power vs speed at steady state.

User avatar
Roni
0
Joined: 20 Feb 2016, 16:26

Re: Velocity calculation in Range and Power Prediction Model

Post

Hey Greg, thanks for replying.

Radius = Wheel Radius;
Formula used for conversion from Angular Velocity to Longitudinal Velocity, Velocity = Angular Velocity x Wheel Radius.
Basically, we are converting the rotational speed to translational speed while ignoring tire slip and other factors.

Also, could you elaborate on what do you mean by plotting the Power vs Speed in steady state here?
Speed has never killed anyone. Suddenly becoming stationary, that's what gets you.
-Jeremy Clarkson

AngusF1
5
Joined: 13 Aug 2017, 10:54

Re: Velocity calculation in Range and Power Prediction Model

Post

Just figure out the formula for power required as a function of speed, then plot the graph over speed. This will give you a first pass estimate of range when cruising at any speed.

After that you could consider a sequence of combinations of speed and time, or speed and distance, while assuming that the energy required to accelerate / decelerate is added at some efficiency which you can guess. You could also consider fixed ramp accel / decel models instead of PID.

Your complex approach I might consider third after those first two. You’re trying to model the transient responses given some PI(D?) model of control, which is fine, but more complex and harder to get right. Of course the interesting part is you can model the effects of different driving styles on on efficiency.


PS increasing the gearing actually could increase the top speed, depending on whether you were previously gearing limited or power limited. It depends.

User avatar
Roni
0
Joined: 20 Feb 2016, 16:26

Re: Velocity calculation in Range and Power Prediction Model

Post

Hey AngusF1, thanks for replying.
The model I have is power limited and the intension behind running the Model is to understand the effect of Motor performance on various Drive Cycles. The problem that I am trying to resolve is how I would calculate velocity from such a model.
Speed has never killed anyone. Suddenly becoming stationary, that's what gets you.
-Jeremy Clarkson

gruntguru
563
Joined: 21 Feb 2009, 07:43

Re: Velocity calculation in Range and Power Prediction Model

Post

Velocity is normally a setpoint. When you drive a car you don't select a throttle opening to get you to the next intersection and accept the acceleration and velocity that results.. You select a velocity and acceleration then control the throttle to get them.
je suis charlie

LaplacesDemon
1
Joined: 21 Jul 2021, 01:57

Re: Velocity calculation in Range and Power Prediction Model

Post

What exactly is the point of the PID? Are you confident it is correctly tuned and not winding up the integrator?
Why not directly solve the equation for throttle position since all variables are known at each time step?

User avatar
Roni
0
Joined: 20 Feb 2016, 16:26

Re: Velocity calculation in Range and Power Prediction Model

Post

I understand that the PID is not a requirement but it is required to have a driver in the simulation for further development of the model in Lateral Dynamics and handling aspect which requires a PI controller.
Regarding the velocity issue, I might have found the solution where we just have to put up a max speed limiter of the maximum speed possible using this (Max Motor Speed*Wheel Radius/Gear Ratio) and let Tractive force generate the Velocity.
Speed has never killed anyone. Suddenly becoming stationary, that's what gets you.
-Jeremy Clarkson

LaplacesDemon
1
Joined: 21 Jul 2021, 01:57

Re: Velocity calculation in Range and Power Prediction Model

Post

It would really help if you plotted velocity target, actual velocity, engine load, tractive force, resistive force and gear ratio with respect to time. It would make it much easier for us to understand what is going on.

AngusF1
5
Joined: 13 Aug 2017, 10:54

Re: Velocity calculation in Range and Power Prediction Model

Post

+1 to that. Post a CSV of your data.

Another tip, break your code up into pieces which each perform some distinct task. You should be able to more or less figure out by yourself what the output of each part should look like, then it should be easy enough to see where it’s going wrong.

Post Reply