Plots look downsampled compared to the original data #2629
-
I simulated the WLTC drive cycle (using my own data), with a power function input. The current, voltage and power plots look really smoothed out compared to the original data that I have (also plotted for comparison). What could be the possible reasons? Plots: You can see that some of the trends in the data are captured, but yeah, not completely accurate. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 21 replies
-
Power inputs are handled via an algebraic function; that is, an extra equation gets solved for the current that reproduces the requested power input. So you probably just need to increase the temporal resolution of your simulation or lower the absolute or relative tolerances. That way, the current needed to mimic the power input gets computed more accurately. |
Beta Was this translation helpful? Give feedback.
-
Looks like a time scaling issue. How are you defining the interpolant? It should be something like this, but for power: # create interpolant - must be a function of *dimensional* time
timescale = param.evaluate(model.timescale)
current_interpolant = pybamm.Interpolant(drive_cycle[:, 0], drive_cycle[:, 1], timescale * pybamm.t) You won't need to specify the timescale any more once we remove the non-dimensionalization. But for now you do. |
Beta Was this translation helpful? Give feedback.
Looks like a time scaling issue. How are you defining the interpolant? It should be something like this, but for power:
You won't need to specify the timescale any more once we remove the non-dimensionalization. But for now you do.