-
Notifications
You must be signed in to change notification settings - Fork 89
Engine Simulation
Ted Dunning edited this page Sep 27, 2015
·
2 revisions
The engine and car simulated in the commuter
model has the following approximate internal parameters:
// observed transmission properties for typical turbo-diesel
private static final double[] MPS_BY_RPM = {
4.4704 / 2000, 8.9408 / 2000, 13.4112 / 2000, 13.4112 / 1500, 17.8816 / 1500, 22.3520 / 1500, 22.3520 / 1000
};
private static final double ZERO_TORQUE_RPM = 3500;
private static final double LOW_SHIFT = 1000;
private static final double HIGH_SHIFT = 2000;
// The throttle has some turbo delay.
public static final double THROTTLE_TIME_CONSTANT = 0.8;
// in kg, not a super light car
private static final double VEHICLE_MASS = 2000;
// in watts (this is about 200 HP)
private static final double MAX_POWER = 150e3;
private static final double TORQUE_AT_ZERO = (4 * MAX_POWER / ZERO_TORQUE_RPM);
// assuming 150 MPH absolute max speed
private static final double DRAG_COEFFICIENT = 0.4875334;
private static final double SHIFT_TIME = 0.1;
These give us about a 7 second 0-60MPH response and seem to give reasonable engine parameter traces.
To get a feel for how the simulated car drives, you can run a visualization which has the vehicle repeating a relatively short trip over and over again while displaying engine and geo traces by using this command
mvn exec:java -Dexec.mainClass="com.mapr.synth.drive.Trails"
Here is an example of such a trace: