The main advantage of "fourth order feedforward" is that it takes into account the flexibility in the system (one resonance between the actuation point and the measurement point, see Figure <fig:feedforward_double_mass_system>).
This can lead to better results than second order trajectory planning as demonstrated [here](https://www.20sim.com/control-engineering/snap-feedforward/).
This means that if a fourth-order trajectory for \\(x\_2\\) is used, the feedforward architecture shown in Figure <fig:feedforward_fourth_order_feedforward_architecture> can be used:
In order to implement a fourth order trajectory, look at [this](https://www.mathworks.com/matlabcentral/fileexchange/16352-advanced-setpoints-for-motion-systems) nice implementation in Simulink of fourth-order trajectory planning (see also (<ahref="#citeproc_bib_item_2">Lambrechts, Boerlage, and Steinbuch 2004</a>)).
{{<figuresrc="/ox-hugo/feedforward_second_order_plant.png"caption="<span class=\"figure-number\">Figure 4: </span>Bode plot of a second order system with fitted model">}}
The idea is to design a feedforward controller that corresponds to the plant inverse:
This controller has a pair of zeros, corresponding to an anti-resonance at the eigenfrequency of the first eigenmode of the system, with equal damping.
The controller needs to be modified in such a way that it becomes realisable.
In this case it is decided to create a resulting overall transfer function of the controller and the plant that acts like a well damped mass-spring system with the same natural frequency as the plant and an additional reduction of the excitation of higher frequency eigenmodes.
In order to realise this controller first two poles have to be added, placed at the same frequency as the resonance but with a higher damping ratio.
Typically a damping ratio between aperiodic and critical (\\(0.7 < \xi<1\\))isappliedtoavoidoscillations.
For \\(\xi = 1\\) this results in the following transfer function:
\\[ C\_{ff}(s) = \frac{s^2 + 2\xi \omega\_0 s + \omega\_0^2}{s^2 + 2 \cdot 1 \cdot \omega\_0 s + \omega\_0^2}\\]
{{<figuresrc="/ox-hugo/feedforward_compensated_system.png"caption="<span class=\"figure-number\">Figure 5: </span>Bode plot of the feedforward controlled system">}}
Notches are at \\(f\_1\\), \\(2f\_1\\), \\(3f\_1\\), ... with \\(f\_1 = \frac{a\_{\text{max}}}{v\_{\text{max}}}\\).
It is therefore possible to choose the velocity and acceleration such that \\(f\_1\\) (or one of its integral multiple) matches the resonance frequency of the system.
Therefore, the acceleration time constant can be chosen at the inverse of the plant resonance.
**3rd order setpoint generation**:
There is a drawback of having an extra time of \\(\frac{a\_{max}}{J\_{max}}\\) seconds.
However, we get an additional -20db/dec at high frequency, and additional notches at \\(f\_2 = \frac{j\_{max}}{a\_{max}}\\).
This new notch has larger "damping" and can be used to be more robust against resonances of the plant.
**Feedforward control**:
Plant inversion: if \\(K\_{ff} = G^{-1}(s) \Longrightarrow e(s) = 0\\)
Challenges:
- Model required
- High order
- Delay/non-minimum phase?
**Rigid body dynamics**:
\\(G(s) = \frac{1}{ms^2}\\)
In that case, \\(G^{-1}(s) = ms^2\\), and with 2nd order setpoint, a feedforward controller \\(K\_{ff}(s) = m\\) gives good performances.
Therefore, it is very important to match the delay of the plant:
> In high-performance control system, it can be useful to consider propagation delay when designing the feedforward and feedback controllers.
> Feedforward control directly uses the reference trajectory and does not depend on any measurement data.
> However, the feedback controller uses (delayed) measured position data.
> Due to propagation delay in the control system (caused by the controller, actuator or sensor), it can take multiple cycles for the effect of feedforward control to be observed in the measured position.
> In the meantime, the feedback control is already seeing a tracking error and is compensating for it.
> Essentially, the result of the feedforward action arrives too late, resulting in possible overcompensation by the feedback control.
> When the propagation delay in the control system is known, it can be compensated for by applying this same delay to the demand position in the tracking error calculation.
<divclass="csl-entry"><aid="citeproc_bib_item_1"></a>Boerlage, M., M. Steinbuch, P. Lambrechts, and M. van de Wal. 2003. “Model-Based Feedforward for Motion Systems.” In <i>Proceedings of 2003 IEEE Conference on Control Applications, 2003. CCA 2003.</i> doi:<ahref="https://doi.org/10.1109/cca.2003.1223174">10.1109/cca.2003.1223174</a>.</div>
<divclass="csl-entry"><aid="citeproc_bib_item_2"></a>Lambrechts, P., M. Boerlage, and M. Steinbuch. 2004. “Trajectory Planning and Feedforward Design for High Performance Motion Systems.” In <i>Proceedings of the 2004 American Control Conference</i>. doi:<ahref="https://doi.org/10.23919/acc.2004.1384042">10.23919/acc.2004.1384042</a>.</div>
<divclass="csl-entry"><aid="citeproc_bib_item_3"></a>Schmidt, R Munnig, Georg Schitter, and Adrian Rankers. 2020. <i>The Design of High Performance Mechatronics - Third Revised Edition</i>. Ios Press.</div>