My project is to build a software to help drivers achieve ecodriving thanks to optimal control based advices. Consequently, to feed a linear quadratic regulator, vehicle longitudinal equation of motion should be transformed into a state space form.
Considering a state having :
$$ \begin{align*} & \dot{s} = v\\ & \dot{v} = \mathit{u}_{t} - \mathit{u}_{b} - \frac{1}{m} 0.5 \mathit{\rho}_{air} A \mathit{C}_{d}v^2 - g(sin \theta(s) + \mathit{C}_{rr} cos \theta(s))\\ \\ \end{align*} $$
where
$\mathit{u}_{t}$ is tractive acceleration
$\mathit{u}_{B}$ is braking acceleration
$m$ is vehicle mass
$\mathit{\rho}_{air}$ is air density
$A$ is the vehicle frontal area
$\mathit{C}_{d}$ is the aerodynamic drag coefficient
$v$ is vehicle velocity
$g$ is gravity
$\theta(s)$ is road grade at position s
$\mathit{C}_{rr}$ is coefficient of rolling
How to linearize nonlinear terms $sin \theta(s)$, $cos \theta(s)$ and $v^2$ ?