Effect of Overflow Mode on Peak Finder Output
The Saturate on integer overflow parameter can affect the output of the Peak Finder block when the input is fixed point.
exPeakFinderWrapSaturate.slx model. The model contains two Peak Finder blocks that detect the maxima in a signal. The blocks output the number of maxima in the signal and the values of each maxima. The Threshold parameter is set to 0.25.
The input signal is a fixed-point signal with a word length of 16 and a fraction length of 15. In the first Peak Finder block, the Saturate on integer overflow parameter is not selected. In this mode, the Peak Finder block causes the calculations and to wrap on overflow, thereby causing the maximum to be missed.