# What does nonnegative zero-phase response mean?

I am not exactly sure what nonnegative zero-phase response means. If a filter is zero-phase (i.e. symmetric and non-causal), then what does nonnegative imply? And what are the conditions to satisfy it?

Context: This is an error I get in Matlab when trying to design min-phase filters: Error using firminphase>checknonnegative (line 79) The filter has to have a nonnegative zero-phase response.

Error in firminphase (line 38) checknonnegative(b);

Error in firgr>genfilter (line 323) hRet = firminphase(hRet, s.zero, 'angles');

• please provide a source or reference. The term doesn't make much sense without context – Hilmar Nov 30 '20 at 22:07
• Sorry for the confusion. This is actually an error I get in Matlab: – dsp_guy2020 Dec 1 '20 at 14:41

What they mean here is that the real-valued amplitude function of the linear phase FIR filter that you provide to the function must be non-negative, because it is interpreted as the desired squared magnitude of the minimum-phase filter. This amplitude function is referred to as zero-phase response, which is the frequency response of the filter when the coefficients are shifted such that they are centered around the origin, i.e., $$b[n]=b[-n]$$ is satisfied. Note that the filter length must be odd.
If $$N$$ is the (odd) filter length, the zero-phase response is given by
$$B_{zp}(e^{j\omega})=B(e^{j\omega})e^{j\omega(N-1)/2}$$
where $$B(e^{j\omega})$$ is the frequency response of the causal filter.