My question is that when I plot this, I see half the sampling rate as the Nyquist frequency. So when I want to learn my cutoff frequency which one I use Fs=80khz or Fs=160khz ?
I'm not sure what you're asking. The plot will show the frequency response from DC to 40kHz (Fs/2 or the Nyquist rate). The frequency response from -40kHz to DC isn't shown as it is the same as from DC to Fs/2, i.e. |H(w)| is even.
I want to design a decimation filter for a Sigma-Delta modulator. The modulator input is 20Khz sinus signal. And this signal is oversampled to 2.5Mhz. So decimation ratio is about 64. First I designed a CIC filter which has a decimation ratio of 16. After a halfband filter and an FIR filter. So halfband filter output is 80 Khz, FIR filter output is 40 khz. Anyway, I want to design halfband and FIR filter with Matlab firhalfband and remez functions. (6th order halfband and 11th order FIR) I'm confused to determine the passband edge frequencies. My aim is at the output 20 khz signal is passed and the noise over 50 khz is supressed. For halfband filter
Actually the rule is that your sampling freq should be atleast twice the highest freq of the system. so you can totally double the sampling frequency to balance that. and maybe there is a good reason u code, but you can do the same stuff in a much easier way by using 'fda tool' in matlab.