Consider the transfer function from reference input $r(t)$ to output $y(t)$,
$$ G(s) = \frac{Y(s)}{R(s)} = \frac{0.02}{s^2 + 0.2 s + 0.02} $$
For feedforward control we can invert $G(s)$ and set
$$ G(s)^{-1} = \frac{s^2 + 0.2 s + 0.02}{0.02} =: \frac{R_{temp}(s)}{R(s)} $$
Then, in the time domain
$$ r_{temp}(t) = 50 \ddot{r}(t) + 10 \dot{r}(t) + r(t) $$
Say I know $r(t)$, for example $r(t) = \sin(\omega t)$, then $\dot{r}(t) = \cos(\omega t)$ and $\ddot{r}(t) = -\sin(\omega t)$. So, then it is possible to implement perfect feedforward although $G(s)^{-1}$ is of course improper. With $r_{temp}(t)$ as new input perfect tracking is reached.
But now consider the case with an extra $s$ in the numerator
$$ F(s) = \frac{Y(s)}{R(s)} = \frac{s + 0.02}{s^2 + 0.2 s + 0.02} $$
Here we have
$$ \dot{r}_{temp}(t) + 0.02 \, r_{temp}(t) = \ddot{r}(t) + 0.2 \, \dot{r}(t) + 0.02 \, r(t) $$
How can I deal with the derivative in the temporary reference input $\dot{r}_{temp}(t)$? Add an integrator? But this would increase the system order although I know everything about my reference? I could of course integrate $r(t)$ and its derivatives, but then I would get an integral over $r_{temp}(t)$ as well, which is the function I want to solve for...
Question: Do I need to implement some extra dynamics for feedforward, even if I have perfect knowledge about the reference and its derivatives?
Edit: Updated the question and deleted answer as my previous solution doesn't work if there is also a constant term in the numerator...
As far as I can see you want $r_\text{temp}$. The equation is a differential equation. If you fix $r(t)$ you can solve for $r_\text{temp}$ because it is a first order linear ordinary differential equation with an external input (given by the $r$ terms) and constant coefficients.
We have
$$\dot{r}_\text{temp}+0.02r_\text{temp}=50\ddot{r}+0.2\dot{r}+0.02r,$$
in which $r$ is a fixed function. We then obtain a function of $t$ on the right-hand side. I will refer to this function as $f(t)$ then. we have
$$\dot{r}_\text{temp}+0.02r_\text{temp}=f(t)$$ $$\implies r_\text{temp}(t) = c_1 \exp(-0.02 t) + \exp(-0.02 t) \int_{t_0}^t \exp(0.02 \tau) f(\tau)~d\tau.$$
You only need to determine the constant of integration $c_1$.