Really simple DSP high-pass filter questionhttps://www.microchip.com/forums/(c) Microchip30Re: Really simple DSP high-pass filter question (prmcgill)I realize that it may have been a typo, but you said, "i've used the fir1 function in MATLAB to generate 65 coefficients of a LPF." Then you said, "However when i use these coefficients in a HPF application..." So you designed a low-pass filter and then used it as a high-pass filter? That might give you the 60 dB of attenuation you're seeing. You can only do this if you apply spectral inversion to the LPF coefficients, which you didn't mention.<br/>https://www.microchip.com/forums/FindPost/1071830Wed, 17 Oct 2018 19:26:00 GMTRe: Really simple DSP high-pass filter question (du00000001)Hi,<br/>no idea about MATLAB fir*() functions - just some hintvas your LPF seems to work:<br/>an HPF may as well be considered the input minus the output of the LPF corresponding to the HPF desired. Might be MATLAB has the same opinion and you missed that point. Thus could be that when subtracting the output value from the filter you've got from the input gives the desired result.<br/>https://www.microchip.com/forums/FindPost/1071812Wed, 17 Oct 2018 13:20:35 GMTReally simple DSP high-pass filter question (adown)Good afternoon. I've worked with DSPs for some time now, but i'm scratching my head at a simple high-pass filter implementation that yields unexpectedly attenuated output.<br/> <br/>My scenario is simple, i've used the fir1 function in MATLAB to generate 65 coefficients of a LPF. The freq response shows the passband is 0db, as it should be. <br/> <br/>However when i use these coefficients in a HPF application and input a signal that should be well into the passband i get an output that's attenuated by almost 1000.<br/> <br/>Has anyone else used MATLAB fir1() to generate HPF coefficients, is there a scaling factor or some application detail i've glossed over?<br/> <br/>-Alexander<br/>https://www.microchip.com/forums/FindPost/1071810Wed, 17 Oct 2018 13:14:18 GMT