From: natanel on 20 Jun 2010 16:10 I am trying to create fix point butter filter to get NUM and DEN for my MCU filtering I know I should do it like that Fs=1000; % sample frequency Fc=45; %cutoff frequency [B,A]=butter(7,Fc/(Fs/2)); hd=dfilt.df2(B,A); %then set hd set(hd,'Arithmetic','fixed'); from there I am quit confised which other set I should do all the output/input data and coeff are Q1.15 signed mean 16 bit numberes with 15 bit Frac any help? thanks
From: Wayne King on 20 Jun 2010 16:32 "natanel " <jn_eizenberg(a)hotmail.com> wrote in message <hvlsj6$h5v$1(a)fred.mathworks.com>... > I am trying to create fix point butter filter to get NUM and DEN for my MCU filtering > > I know I should do it like that > Fs=1000; % sample frequency > Fc=45; %cutoff frequency > [B,A]=butter(7,Fc/(Fs/2)); > hd=dfilt.df2(B,A); > > %then set hd > set(hd,'Arithmetic','fixed'); > > from there I am quit confised which other set I should do > > all the output/input data and coeff are Q1.15 signed > mean 16 bit numberes with 15 bit Frac > > any help? > thanks Hi Natanel, That depends on the reason why you are designing a fixed-point filter. Presumably you are designing the filter with a particular embedded system in mind? What are the wordlength constraints of that system? etc. Wayne
From: natanel on 21 Jun 2010 00:30 Hi it is for atmel dsp32 and used with dsp16_t mean all wordlength are 16 bit input, output, coeff when it is set to Q A.B signed A=1 bit B=15 bit thanks
|
Pages: 1 Prev: is bootci with bootfun returning a vector possible? (at least Next: A complex convolution |