DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →

FILTERING THE DISTORTION

Started by rashmi venugopal ●May 24, 2011


firstly sory for late reply, as i was not feeling well.,


thanks for u r valuable saggestions.

dear sir,
actually its a power line, later this desing will be implemented in the
meters to monitor the THD.

so i am doing my final year project,in a MNC,
i am bound to there inputs,
that they told me use IIR FILTER ITSELF.
and iir filter should take input of harmonic distorted signal and input of
filter coefficients,
and using filter coefficients, it has to filter out the distortion and
reproduce pure fundamental signal.


i am working on lab view,
and the coefficients which i have mentioned below is from LAB VIEW itself,

whole design is in lab view.

>Rashmi, > >Normally I don't "top post" but I'm going to intersperse comments makred >with *** below: > >On 5/24/2011 3:51 AM, rashmi venugopal wrote: >> ampliude= 240volts >> fundamental sine wave=50hz. >> 2nd harmonic=100hz---> 30% of 100hz is = 30 * 240/100 = 72 >> >> 3rd harmonic= 150hz--> 30% of 150 hz is = 20 * 240/100= 48 >> >> 5th harmonic= 250hz--> 10% 0f 250hz is = 10 *240/100 =24 >> >> >***I think you mean 30% of 50Hz above... etc. That's were the 240 comes >from, right? > >> >> now To inject the harmonics to fundamental wave we get harmonic >> distortion >> >> 240 + 72 + 48 +24 =384 volts. > >***This ain't DC. You can't just add the rms voltage values to get a >new rms voltage. Consider: just what *is* "rms"? There is an essential >phase relationship that has to be accounted for to do this. And anyway, >why do you care about this one thing? I don't see a use for it. > >> >> now we have to filter the harmonic distortion of 384 volts to recover
the
>> 240 volts >> >> to filter this harmonic distortion we have to use IIR filter > >***You don't have to use an IIR filter - so don't delude yourself into >that thinking. But, if the professor says you must to suit his/her >purposes, then you must. >> >> order=2 >> sampling freq =1000 >> pass band =45 >> stop band =65 > >***As Jerry points out, the pass band and stop band frequencies make no >sense if the fundamental of interest is at 50Hz. >> >> >> so by above specifications we get the filter coefficients >> >> reverse coeeficients= -3.4863 , 4.7565 , -3.0021 , 0.7432 >> farward coefficients= 0.0112 , 0.000 , -0.0223 , 0.0000 , >> >> these are the coefficients i am getting , > >***I won't compute or dispute these but if they are based on the specs >above then they surely won't be what you need. >> >> sir now i need to recover the fundamental 240volts from the distortion
of
>> 384 volts using this filter and filter coefficients. > >***Are we dealing with power here or just a signal that represents the >voltages on a power line? Probably makes a difference in how you >implement any filter!! > >***Here is what you need to do with a signal: > >1) implement the filter. It's an IIR digital filter so the data has to >be sampled. > >2) apply the sampled signal to the filter > >3) the output of the filter is the desired filtered signal. >> >> i am stucked here to filter the distortion,, >> kindly reply to my mail. > >***See above. > >Fred >
>sorry for the late reply >as i was not feeling well >i could not check replies.
i want to know, what is the logic of an iir filter that filters the distortion and give output of pure fundamental sine wave. what arithmetiacal or mathematical operation does iir filter perform .
> > > > > > > > > > > >ampliude= 240volts >>>fundamental sine wave=50hz. >>>2nd harmonic=100hz---> 30% of 100hz is = 30 * 240/100 = 72 >>> >>>3rd harmonic= 150hz--> 30% of 150 hz is = 20 * 240/100= 48 >>> >>>5th harmonic= 250hz--> 10% 0f 250hz is = 10 *240/100 =24 >>> >>> >>> >>>now To inject the harmonics to fundamental wave we get harmonic >>>distortion >>> >>>240 + 72 + 48 +24 =384 volts. >>> >>>now we have to filter the harmonic distortion of 384 volts to recover >the >>>240 volts >>> >>>to filter this harmonic distortion we have to use IIR filter >>> >>>order=2 >>>sampling freq =1000 >>>pass band =45 >>>stop band =65 >>> >>> >>>so by above specifications we get the filter coefficients >>> >>>reverse coeeficients= -3.4863 , 4.7565 , -3.0021 , 0.7432 >>>farward coefficients= 0.0112 , 0.000 , -0.0223 , 0.0000 , >>> >>>these are the coefficients i am getting , >>> >>>sir now i need to recover the fundamental 240volts from the distortion >of >>>384 volts using this filter and filter coefficients. >>> >>>i am stucked here to filter the distortion,, >>>kindly reply to my mail. >> >>Why are you stuck? You keep asking roughly the same question, but choose >to >>ignore the answers. >> >>Steve >> >> >
On Jun 1, 8:37�am, "rashmi venugopal"
<rashu32003@n_o_s_p_a_m.gmail.com> wrote:

> i want to know, what is the logic of an iir filter that filters the > distortion and give output of pure fundamental sine wave.
It doesn't. It reduces noise outside the passband. And often enough, also inside the passband.
> what arithmetiacal or mathematical operation does iir filter perform .
The four basic ones: sums, differences, multiplications, divisions. Rune
On 5/31/2011 11:37 PM, rashmi venugopal wrote:
> i want to know, what is the logic of an iir filter that filters the > distortion and give output of pure fundamental sine wave.
Rashmi, There's only logic if you implement it in software or in an FPGA. If you implement it with delay elements and summing amps then there is no logic. :-) I'm sorry if that's not what you meant but I couldn't resist.... Maybe you mean "design philosophy"? Just how philosophical would one have to get? The idea of any filter is to add things in phase in order to emphasize them and to add things out of phase in order to diminish them. Delay elements and weighting elements are used to accomplish this. Differential equations describe the dynamic response. Methods for filter design have developed. Using these methods generally starts with a filter specification like: Where are the pass bands needed? How flat? Where are stopbands needed? How much attenutation? Any phase requirements in particular? You would do well to start there. It's not clear that you have done this. Then, whether a filter is IIR or FIR usually comes out of considering trades between the two relative to those specifications. What *are* your needs/specifications in terms of passbands and stopbands? If all you want as output is the fundamental frequency sine wave then a lowpass filter will do. But, that depends on the spec's. For example, if you want the harmonics to be highly attenuated or virtually zeroed then you might consider a filter design that has zeros in the stopband at the harmonic frequencies. And you might do better by making the rest of the stopband attenuation less stringent, etc. etc. Fred
>> >IIR Cascade Filter with I.C. (DBL) this icon in the lab view, filters the
harmonic distortion by using the filter coefficients, can any 1 tell me how does this icon work, whats the internal logic behind this, i have uploded picture of this icon, i have searched in ggogle i am not getting. kindly reply thanking you rashmi
> > > > > > > > >ampliude= 240volts >>>fundamental sine wave=50hz. >>>2nd harmonic=100hz---> 30% of 100hz is = 30 * 240/100 = 72 >>> >>>3rd harmonic= 150hz--> 30% of 150 hz is = 20 * 240/100= 48 >>> >>>5th harmonic= 250hz--> 10% 0f 250hz is = 10 *240/100 =24 >>> >>> >>> >>>now To inject the harmonics to fundamental wave we get harmonic >>>distortion >>> >>>240 + 72 + 48 +24 =384 volts. >>> >>>now we have to filter the harmonic distortion of 384 volts to recover >the >>>240 volts >>> >>>to filter this harmonic distortion we have to use IIR filter >>> >>>order=2 >>>sampling freq =1000 >>>pass band =45 >>>stop band =65 >>> >>> >>>so by above specifications we get the filter coefficients >>> >>>reverse coeeficients= -3.4863 , 4.7565 , -3.0021 , 0.7432 >>>farward coefficients= 0.0112 , 0.000 , -0.0223 , 0.0000 , >>> >>>these are the coefficients i am getting , >>> >>>sir now i need to recover the fundamental 240volts from the distortion >of >>>384 volts using this filter and filter coefficients. >>> >>>i am stucked here to filter the distortion,, >>>kindly reply to my mail. >> >>Why are you stuck? You keep asking roughly the same question, but choose >to >>ignore the answers. >> >>Steve >> >> >
IIR Cascade Filter with I.C. (DBL) this icon in the lab view, filters the
harmonic distortion by using the filter coefficients, can any 1 tell me how
does this icon work, whats the internal logic behind this, i have uploded 
picture of this icon, i have searched in ggogle i am not getting.

kindly reply

 

thanking you

rashmi

>IIR Cascade Filter with I.C. (DBL) this icon in the lab view, filters the >harmonic distortion by using the filter coefficients, can any 1 tell me
how
>does this icon work, whats the internal logic behind this, i have uploded
>picture of this icon, i have searched in ggogle i am not getting. > >kindly reply > > > >thanking you > >rashmi > >
Perhaps you should check the Labview documentation? Mark
On 6/1/2011 11:55 PM, rashmi venugopal wrote:
> IIR Cascade Filter with I.C. (DBL) this icon in the lab view, filters the > harmonic distortion by using the filter coefficients, can any 1 tell me how > does this icon work, whats the internal logic behind this, i have uploded > picture of this icon, i have searched in ggogle i am not getting. > > kindly reply > > > > thanking you > > rashmi >
Well at least now we know what you're referring to. Still, I'm not clear as to what your objective is. "How does an icon work" isn't a very clear question in a comp.dsp context. From Wikipedia re: Total Harmonic Distortion: "The total harmonic distortion, or THD, of a signal is a measurement of the harmonic distortion present and is defined as the ratio of the sum of the powers of all harmonic components to the power of the fundamental frequency" [then goes on to say that sometimes it's the square root of this number] Can you envision that this implies: - a high-pass filter to get all harmonic components (less the fundamental) and - a low-pass filter to get the fundamental. And then you compute the ratio of the rms outputs squared? Or, more simply perhaps: - low-pass filter to get the fundamental. - calculate the harmonic rms using the filter input and filter output (carefully) - calculate the ratio of the harmonic rms to the fundamental rms to get THD. I'm sure that a serious student can research and work out the details... Fred
>Still, I'm not clear as to what your objective is. "How does an icon >work" isn't a very clear question in a comp.dsp context.
To me he's referring to the LabView IIR widget itself, i.e., "how does it work," which begs the question "why not read the documentation included with LabView." If he does not have the documentation, why not, pirated copy? If he does we're back to the same initial question. Mark
On 6/3/2011 6:15 AM, taks wrote:
>> Still, I'm not clear as to what your objective is. "How does an icon >> work" isn't a very clear question in a comp.dsp context. > > To me he's referring to the LabView IIR widget itself, i.e., "how does it > work," which begs the question "why not read the documentation included > with LabView." If he does not have the documentation, why not, pirated > copy? If he does we're back to the same initial question. > > Mark > >
Mark, Yes, I figured what he was referring to. It's a terrible question and deserves some thought on his part. You suggestion is a good one. But, I sense that he doesn't know what it is he wants to do other than just push a button.... Fred