Hi All, I have a doubt in IIR filter output from a known Input values. I designed a IIR filter depending on specifications in such a way that gain of the filter is always less than. Also, Input is less tha one. I thought ouput also should less than 1 but not. I don't know the reason but output is crossing 1 for some values which has to fit in 1.31 format. Everything observed in matlab so it's not a quantisation or noise problem. It would be great help if any one let me know 1) Whether the output can crosses one with the above details 2) How to find the maximum & minimum values of a IIR filter, if the input is less than 1. 3) Is it possible to design a IIR filter in which ouput will always less than 1 with the above condtions. Thanks in advance Raja _____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ?
regarding output from a IIR filter
Started by ●May 23, 2007
Reply by ●May 23, 20072007-05-23
On May 23, 4:12 pm, "raja12345" <rajara...@gmail.com> wrote:> Hi All, > > I have a doubt in IIR filter output from a known Input values. I > designed a IIR filter depending on specifications in such a way that gain > of the filter is always less than. Also, Input is less tha one. I thought > ouput also should less than 1 but not. I don't know the reason but output > is crossing 1 for some values which has to fit in 1.31 format. Everything > observed in matlab so it's not a quantisation or noise problem. > > It would be great help if any one let me know > 1) Whether the output can crosses one with the above details > 2) How to find the maximum & minimum values of a IIR filter, if the input > is less than 1. > 3) Is it possible to design a IIR filter in which ouput will always less > than 1 with the above condtions. > > Thanks in advance > Raja > > _____________________________________ > Do you know a company who employs DSP engineers? > Is it already listed athttp://dsprelated.com/employers.php?Take the sum of the fundamental frequency and 3rd harmonic for a square wave. Scale the result to one. Now remove the third harmonic. What happened to the amplitude? Dirk Now remove the
Reply by ●May 23, 20072007-05-23
dbell wrote: ...> Take the sum of the fundamental frequency and 3rd harmonic for a > square wave. > Scale the result to one. > Now remove the third harmonic. > What happened to the amplitude?Just to nail it down, wherever the the fundamental crosses zero, the harmonic crosses zero in the same direction. Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by ●May 23, 20072007-05-23
Jerry Avins wrote:> dbell wrote: > > ... > >> Take the sum of the fundamental frequency and 3rd harmonic for a >> square wave. >> Scale the result to one. >> Now remove the third harmonic. >> What happened to the amplitude? > > Just to nail it down, wherever the the fundamental crosses zero, the > harmonic crosses zero in the same direction. > > JerryI'm sure you meant to say "Whenever the fundamental _of a square wave_ crosses zero, the harmonic crosses zero in the same direction." In general the harmonics need to have no such simple relationship to the fundamental. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by ●May 23, 20072007-05-23
Tim Wescott wrote:> Jerry Avins wrote: >> dbell wrote: >> >> ... >> >>> Take the sum of the fundamental frequency and 3rd harmonic for a >>> square wave. >>> Scale the result to one. >>> Now remove the third harmonic. >>> What happened to the amplitude? >> >> Just to nail it down, wherever the the fundamental crosses zero, the >> harmonic crosses zero in the same direction. >> >> Jerry > > I'm sure you meant to say "Whenever the fundamental _of a square wave_ > crosses zero, the harmonic crosses zero in the same direction."I was nailing down Bell's prescription for generating a waveform that increases the peak magnitude when low-pass filtered. What he described was cos(wt) + cos(3wt)/3; that's what I tried to make clear.> In general the harmonics need to have no such simple relationship to the > fundamental.No, but if the original waveform were cos(wt) - cos(3wt)/3, filtering out the harmonic would reduce the peak amplitude. Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by ●May 23, 20072007-05-23
Jerry Avins wrote:> Tim Wescott wrote: >> Jerry Avins wrote: >>> dbell wrote: >>> >>> ... >>> >>>> Take the sum of the fundamental frequency and 3rd harmonic for a >>>> square wave. >>>> Scale the result to one. >>>> Now remove the third harmonic. >>>> What happened to the amplitude? >>> >>> Just to nail it down, wherever the the fundamental crosses zero, the >>> harmonic crosses zero in the same direction. >>> >>> Jerry >> >> I'm sure you meant to say "Whenever the fundamental _of a square wave_ >> crosses zero, the harmonic crosses zero in the same direction." > > I was nailing down Bell's prescription for generating a waveform that > increases the peak magnitude when low-pass filtered. What he described > was cos(wt) + cos(3wt)/3; that's what I tried to make clear. > >> In general the harmonics need to have no such simple relationship to >> the fundamental. > > No, but if the original waveform were cos(wt) - cos(3wt)/3, filtering > out the harmonic would reduce the peak amplitude.I'm not sure any more. Filtering all the harmonics out of a +/-1 square wave leaves a fundamental of magnitude +/-4/pi. The effect is at best less if only the third harmonic is present initially. Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by ●May 24, 20072007-05-24
raja12345 wrote:> I have a doubt in IIR filter output from a known Input values. I > designed a IIR filter depending on specifications in such a way that gain > of the filter is always less than. Also, Input is less tha one. I thought > ouput also should less than 1 but not. I don't know the reason but output > is crossing 1 for some values which has to fit in 1.31 format. Everything > observed in matlab so it's not a quantisation or noise problem.Someone else can agree or disagree, but I would consider... First take the impulse response of the filter, then sum the absolute value of the samples that come out. If the input has plus or minus one in the appropriate order then the output will equal that sum. The maximum amplitude of the input must be less than 1/(the above sum). -- glen
Reply by ●May 24, 20072007-05-24
>On May 23, 4:12 pm, "raja12345" <rajara...@gmail.com> wrote: >> Hi All, >> >> I have a doubt in IIR filter output from a known Input values. I >> designed a IIR filter depending on specifications in such a way thatgain>> of the filter is always less than. Also, Input is less tha one. Ithought>> ouput also should less than 1 but not. I don't know the reason butoutput>> is crossing 1 for some values which has to fit in 1.31 format.Everything>> observed in matlab so it's not a quantisation or noise problem. >> >> It would be great help if any one let me know >> 1) Whether the output can crosses one with the above details >> 2) How to find the maximum & minimum values of a IIR filter, if theinput>> is less than 1. >> 3) Is it possible to design a IIR filter in which ouput will alwaysless>> than 1 with the above condtions. >> >> Thanks in advance >> Raja >> >> _____________________________________ >> Do you know a company who employs DSP engineers? >> Is it already listed athttp://dsprelated.com/employers.php? > >Take the sum of the fundamental frequency and 3rd harmonic for a >square wave. >Scale the result to one. >Now remove the third harmonic. >What happened to the amplitude? > >Dirk >Now remove the > >Thanks Dirk. I am at the starting stage of digital signal processing. So could you please tell me in more mathematical way to find the sum of fundamental frequency & 3rd hormonic for a square wave. Also let me know whether it's possible to design a IIR high pass filter in which ouput should less than 1 without scaling of input.( Input < 1 ) Thanks Raja _____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ?
Reply by ●May 24, 20072007-05-24
>raja12345 wrote: > >> I have a doubt in IIR filter output from a known Input values. I >> designed a IIR filter depending on specifications in such a way thatgain>> of the filter is always less than. Also, Input is less tha one. Ithought>> ouput also should less than 1 but not. I don't know the reason butoutput>> is crossing 1 for some values which has to fit in 1.31 format.Everything>> observed in matlab so it's not a quantisation or noise problem. > >Someone else can agree or disagree, but I would consider... > >First take the impulse response of the filter, then sum the absolute >value of the samples that come out. If the input has plus or minus >one in the appropriate order then the output will equal that sum. > >The maximum amplitude of the input must be less than 1/(the above sum). > >-- glen > >Glen, Sum of absolute values of impulse response of IIR high pass filter is not matching with maximum value of filter response with input having alternate + or - one. I might have wrongly decoded your message. So could you tell me waht is "appropiate order". Also if the maximum amplitude of input is scaled to 1/(max_sum), then the ouput also effects in that way. But in my case output should fit in 1.31 without any effect. So is it possible to design a IIR high pass filter in which o/p should always less than 1 where input is always less than 1(by satisfying all filter specifications). Thanks Raja _____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ?
Reply by ●May 24, 20072007-05-24
On 24 Mai, 08:23, "raja12345" <rajara...@gmail.com> wrote:> >raja12345 wrote: > > >> I have a doubt in IIR filter output from a known Input values. I > >> designed a IIR filter depending on specifications in such a way that > gain > >> of the filter is always less than. Also, Input is less tha one. I > thought > >> ouput also should less than 1 but not. I don't know the reason but > output > >> is crossing 1 for some values which has to fit in 1.31 format. > Everything > >> observed in matlab so it's not a quantisation or noise problem. > > >Someone else can agree or disagree, but I would consider... > > >First take the impulse response of the filter, then sum the absolute > >value of the samples that come out. If the input has plus or minus > >one in the appropriate order then the output will equal that sum. > > >The maximum amplitude of the input must be less than 1/(the above sum). > > >-- glen > > Glen, > > Sum of absolute values of impulse response of IIR high pass filter is > not matching with maximum value of filter response with input having > alternate + or - one.You don't need alternate +/- 1.0. What Glen wrote is this: Let h[n], n=0,1,2,..., be the impulse response of your IIR filter. Then the maximum value that can come out of a convolution of h with any input signal x (in the range [-1,1]) is equal to the sum of the absolute values of the impulse response: maxval = sum_n | h[n] |, where the sum goes from n=0 up to infinity. In practice, you can truncate the sum after a finite amount of terms, after which the impulse response has decayed below the noise floor.> So is it possible to design a IIR high pass filter in > which o/p should always less than 1 where input is always less than 1(by > satisfying all filter specifications).Well yes, by scaling the impulse response with "maxval". In many real- live situations, this scaling will be overly conservative, but it is the only one that guarantees no overflow. Regards, Andor






