A control approach for PDE dynamics in Li-ion batteries using differential flatness theory