

5.5 Assignment Solutions  Lecture 5
Solution mfiles:
The key to solving the problem is formulating an equation that resembles the verbal solution given in the problem.
The total distance travelled is equal to the distance
x travelled on initial battery power + the distance y travelled on energy through regenerative braking:
dist_{total} = x + y (Eq. 5.29)
The variable y depends on x given that 20% of x's distance the vehicle was braking:
y = 0.2 * x (Eq. 5.30)
Since regenerative braking effectively adds to the distance that the vehicle can travel, we could say that y is the additional distance travelled based on regenerative braking. However, we must still include the efficiency values. 50% of the 20% additional distance is lost due to inefficiencies when storing the energy in the batteries (mechanical power to electrical power), and 50% of that is again lost when converting electrical power to mechanical power. This effectively means that of the 20% only 5% are left for true additional distance travelled:
y = 0.05 * x (Eq. 5.31)
This additional distance y is only the first (the red) portion of additional distance in figure
5.27. To include the blue and additional distances we change the formula to:
y = (0.05 * x) + (0.05 * 0.05 * x) + (0.05 * 0.05 * 0.05 * x) + ... (Eq. 5.32)
Rewritten:
y = (0.05 * x) + (0.05^{2} * x) + (0.05^{3} * x) + ... (Eq. 5.33)
Plug Eq.
5.33 back into Eq. 5.29:
dist_{total} = x + (0.05 * x) + (0.05^{2} * x) + (0.05^{3} * x) + ... (Eq. 5.34)
Isolate x:
dist_{total} = x * (1 + 0.05 + 0.05^{2} + 0.05^{3} + ...) (Eq. 5.35)
Bring knowns and unknowns on their respective sides of the equation:
x = dist_{total} / (1 + 0.05 + 0.05^{2} + 0.05^{3} + ... ) (Eq. 5.36)
For a converging geometric series of the form:
a + ar + ar^{2} + ar^{3} + ... + ar^{n} (Eq. 5.37)
where
a is some constant and r is a recurring term (0 < r < 1) with increasing exponent, the following equation computes the quantity of the series:
a/(1r) (Eq. 5.38)
Letting
a=1 and r=0.05, we can rewrite Eq. 5.36 as follows:
x = dist_{total} / (1/(1r)) (Eq. 5.39)
This is in fact the general solution to the problem.
We now create an mfile for the function that computes the general geometric series:
function s = geometric_series(a, r) % GEOM_SERIES a, r % GEOM_SERIES(A, R) computes the geometric series % A + AR + AR^2 + AR^3 + AR^4 + ... % as % A %  % 1  R
error(nargchk(2, 2, nargin));
s = a / (1  r);
The file is saved as geometric_series.m


Figure 5.28 Click image to enlarge, or click here to open


We then create an mfile for the assignment solution:
exercise_batterypower;
dist_total = 16000; % in meters regen_braking = 0.2; % in percent
r = regen_braking * (eff_overall ^ 2); init_distance = dist_total / geometric_series(1, r);
dist_regen = dist_total  init_distance
We save the file as assignment_regenbraking.m


Figure 5.29 Click image to enlarge, or click here to open


Finally we execute the assignment file and find out that a mere 800 meters are added to 15.2 km initial distance through regenerative braking. Whether this result is in fact applicable to the actual Segway is questionable. We assumed efficiency values of 50% which may be much lower than the actual values.


Figure 5.30 Click image to enlarge, or click here to open



