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 [2](#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 [3](#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_1">Lambrechts, Boerlage, and Steinbuch 2004</a>)).
## Model Based Feedforward Control for Second Order resonance plant {#model-based-feedforward-control-for-second-order-resonance-plant}
{{<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">}}
<divclass="csl-entry"><aid="citeproc_bib_item_1"></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>, nil. doi:<ahref="https://doi.org/10.23919/acc.2004.1384042">10.23919/acc.2004.1384042</a>.</div>
<divclass="csl-entry"><aid="citeproc_bib_item_2"></a>Schmidt, R Munnig, Georg Schitter, and Adrian Rankers. 2020. <i>The Design of High Performance Mechatronics - Third Revised Edition</i>. Ios Press.</div>