Something to think about:

Status
Not open for further replies.

rattus

Senior Member
crossman said:
I'm not catching this, rattus. If the filter is blocking out all the voltage except the fundamental, and then we want to know the voltage at any given instant, don't we need to adjust Ep by multiplying it by cos(wt)?

What I am seeing, if the filter is perfect, then it is creating a sine wave voltage from the square wave. This new sine wave voltage is what causes the current to flow.

To me, the square wave/filter combo isn't any different than a regular generator producing a sine wave voltage.

What am I missing?

The filter does not change the shape of the square wave. It prevents the flow of harmonic currents leaving only the fundamental current. So you end up with a square wave voltage and a sinusoidal current. Don't worry about the waveforms at the output of the filter--just at the input.

So your instantaneous power is,

p(t) = Ep x Ip x cos(wt)
 
Last edited:

crossman

Senior Member
Location
Southeast Texas
Rattus:

Here is a diagram I would like to review. A battery is connected to a "perfect" DPDT switch. The DPDT switch is wired so that it reverses the polarity of the DC voltage. The switch is rhythmically operated back and forth to set up a square wave voltage of whatever frequency we desire.

The square wave voltage from the DPDT is connected to the filter. The filter feeds a resistive load. The filter allows only a sinusoidal current to flow to the resistor.

Would this be an acceptable diagram of the situation?

squarewave.jpg
 

crossman

Senior Member
Location
Southeast Texas
winnie said:
If you take a +-1V 50% square wave and feed it through an _ideal_ filter that will only pass fundamental, then you will end up with a +-4/pi sine function. Read that again :) The peak voltage of the fundamental component of the a square wave is greater than the peak voltage of the source square wave.

Hey Winnie, thank you for the points you made with the Fourier analysis... very interesting, and something that I have only rudimentary knowledge of. And the wikpedia link was informative.

But, using the diagram I have posted above, I just don't see how any kind of a passive filter could ever raise the sine wave output voltage above that of the peak square wave voltage. Any thoughts?
 

rattus

Senior Member
Fourier Series:

Fourier Series:

crossman said:
Hey Winnie, thank you for the points you made with the Fourier analysis... very interesting, and something that I have only rudimentary knowledge of. And the wikpedia link was informative.

But, using the diagram I have posted above, I just don't see how any kind of a passive filter could ever raise the sine wave output voltage above that of the peak square wave voltage. Any thoughts?

Takes some serious math, but it is true. Winnie points out that that the amplitude of the fundamental is,

Vpf = Vp x 4/pi

Then the RMS value of the fundamental is,

Vrmsf = Vp x 4/(sqrt(2) x pi) = 0.9Vp

where Vp is the amplitude of the square wave.
 

crossman

Senior Member
Location
Southeast Texas
Rattus:

Please review my thoughts and see if they have any validity:

Thought #1:

Instantaneous Power measured at the battery would be the DC voltage multiplied by the current. The current would be a pulsating DC, starting from a sine wave but having the negative half-cycle flopped up to be positive. Pinst = Ep x Ip x cos(wt).

Measuring instantaneous power after the DPDT switch where it is connected to the filter, with the square wave voltage, we get Pinst = Ep x Ip x cos(wt).

Measuring instantaneous power at the load, we get Pinst = Ep x cos(wt) x Ip x cos(wt).

Does that seem right? If so, then the filter must consume some power.

Thought #2:

At the battery: Pinst = Ep x Ip x cos(wt). I see some issues with positive and negative powers here. Because the current is actually a pulsating DC with no negative half-cycle, we really need to take the absolute value of cos(wt)?

At the input of the filter, we get Pinst = Ep x Ip x cos(wt). There seems to be some mathematical issues with positive and negative powers here? Ep is taken as positive, Ip is taken as positive, but cos(wt) could be negative causing us to average some negative powers in with the positive powers? Or do we only use the first half-cycle? Wouldn't cos(wt) need to also be an absolute value?

Measuring instantaneous power at the load, we get Pinst = Ep x cos(wt) x Ip x cos(wt). This formula has no issues with positive and negative powers because having cos(wt) multiplied twice, the signs take care of themselves.

Thoughts?
 
Last edited:

crossman

Senior Member
Location
Southeast Texas
Rattus, let me make that more concise:

With your Pinst formula, don't we need to do something to account for the fact that the voltage is sometimes positive and sometimes negative in the square wave?

The formula: Pinst = Ep x Ip x cos(wt), while giving negative values for current in parts of the cycle, does not account for the times when the voltage is negative.

Am I on something?
 

crossman

Senior Member
Location
Southeast Texas
rattus said:
Takes some serious math, but it is true. Winnie points out that that the amplitude of the fundamental is,

Vpf = Vp x 4/pi

Then the RMS value of the fundamental is,

Vrmsf = Vp x 4/(sqrt(2) x pi) = 0.9Vp

where Vp is the amplitude of the square wave.

I can believe this if the square wave is put together from a bunch of sine waves of different frequencies, but to say the DC battery can produce a higher voltage than its maximum, I just can't see it.

For example, if I used a variable resistor as the filter, and precisely turned it up and down to mimick a sine wave voltage of the fundamental frequency, we wouldn't get Ep larger than the battery voltage. This may not be a good example of a proper filter.

Now, I guess if the filter consisted of a bunch of capacitors and inductors and such, then yeah, maybe that fundamental could have a higher voltage?

But does it HAVE to be there?
 

rattus

Senior Member
Crossman,

The voltage at the output of the filter would be,

(4/pi) x Vp x cos(wt)--assuming a unity transfer ratio.

This is because the fundamental of the square wave is greater than Vp!

The formula for p(t) is correct because the current is negative when the voltage is negative, therefore p(t) is always positive since we assume the current to be in phase with the fundamental.

The filter is lossless because I said so.

Google Fourier Series if you want to stay awake tonight.
 

crossman

Senior Member
Location
Southeast Texas
Okay, I have some serious reservations here. But let me add that I love this stuff, rattus, having you pose these questions which get my brain rattling is great. Thank you!

At the line side of filter:

Pinst = Vp x Ip x cos(wt)

At the resistor:

Pinst = (4/pi) x Vp x cos(wt) x Ip x cos(wt)

Since we have no losses in the filter, and we are assuming theoretically perfect conductors and source, so no losses there, the instantaneous power measured at the line side of the filter would have to equal the instantaneous power measured at the resistor, right?

So:

Vp x Ip x cos(wt) = (4/pi) x Vp x cos(wt) x Ip x cos(wt)

a little algebra:

1 = (4/pi) x cos(wt)

and does that have any meaning? To me, that is saying there is only one place on the cycle where we aren't violating the law about creating and destroying energy. I am confused.:-?

Edit: in cos(wt), w is a constant, right?
 
Last edited:

rattus

Senior Member
Crossman,

The voltage at the output of the filter would be,

(4/pi) x Vp x cos(wt)--assuming a unity transfer ratio.

This is because the fundamental of the square wave is greater than Vp!

You are right, we should take the magnitude of the cosine wave in the power formula, then p(t) would always be positive.

The filter is lossless because I said so.

Google Fourier Series if you want to stay awake tonight.
 

winnie

Senior Member
Location
Springfield, MA, USA
Occupation
Electric motor research
I am running experiments now, so can't do a proper analysis.

First, I realized that the filter is not fully defined. Is it a 'shunt' filter or a 'series' filter. In other words, is it a short circuit for frequencies greater than fundamental, so that the load only sees the fundamental, or is it an open circuit for frequencies above the fundamental. I presume that since we are considering a voltage source, that we have a series filter.

My _hunch_ is that the instantaneous power going in to the filter is not the same as the instantaneous power coming out of the filter.

The input voltage to the filter is a square wave. The input current to the filter is a sine wave. The instantaneous power is just A*cos(omega). The input voltage is +-1, and I will _define_ the input current as peaking at +-1 (I adjust the resistance to get this.) so that I can force a situation where A=1.

The output voltage of the filter is a sine wave. The output current from the filter is a sine wave. The instantaneous power is thus B*cos^2(omega).

My hunch is that B is > A and that the perfect filter has to store some energy during parts of the cycle, sometimes taking in more instantaneous power then is going out, other times delivering more instantaneous power then is coming in.

-Jon
 

crossman

Senior Member
Location
Southeast Texas
I'm still pondering the other stuff. The way I see it - for the filter to "raise the voltage" above the source, it will have to store some energy from the source in the first quarter cycle, then release that energy to raise the voltage above the battery voltage.

Woah, Winnie, that is exactly what I was thinking in some shape or form!
 

rattus

Senior Member
Fyi:

Fyi:

This ideal filter presents infinite impedance to the harmonics and presents a resistive load to the fundamental. Its function is to allow a single sinusoidal current to flow to the load.

The source is an emf, therefore it cannot be changed.

The Fourier series stands alone. The filter has nothing to do with the fact that the amplitude of the fundamental is greeter than the amplitude of the square wave. It has to be greater in order to offset the effects of the harmonics. It is a mathematical thing, you need trig and calculus to understand it halfway.
 

crossman

Senior Member
Location
Southeast Texas
But rattus, I just can't see how our battery could ever produce a voltage greater than the voltage from the + terminal to the - terminal. For a filter to make this happen, wouldn't the filter have to store some energy to boost the voltage above that available at the battery terminals?

Concerning:

Pinst to filter = Pinst out of filter
Vp x Ip x cos(wt) = (4/pi) x Vp x cos(wt) x Ip x cos(wt)

a little algebra:

1 = (4/pi) x cos(wt)

would this be the point where the sine wave and square wave were equal?

sq-sin.jpg
 

rattus

Senior Member
Well sort of:

Well sort of:

Skipping the hard stuff, a symmetrical rectangular wave may be written as,

v(t) = V1 x sin(wt) + (V1/3) x sin(3wt) + (V1/5) x sin(5wt) .....................

where V1 is the peak value of the fundamental and where,

V1 = Vp x 4/pi and Vp is the peak value of the rectangular wave.

Sketch out the 1st, 3rd, and 5th harmonics and add them to see a square wave taking shape.

With a simulation program, you can simulate this with a summing amplifier.

Weird, ain't it?
 

bcorbin

Senior Member
I think we need to clarify something. Is the square wave actually produced by a fundamental and all of the necessary harmonics? or is it just a DC source switched on and off?

If it is the former, I agree with Winnie...the resultant voltage will be greater than the amplitude of the square wave.

If it's the latter, it won't.

If you ever watch "The Mechanical Universe", with David L. Goodstein of Cal-Tech, he does an amazing (to me at least) experiment sort of along these same lines. He places two polarizing filters in the path of a beam of light. Two demonstrate the interaction of two filters, he rotates one 90 degrees against the other and shows how it gradually reduces the beam from full brightness to completely dark. You're now supposed to think "no light is getting through" Then comes the amazing part. He adds a third filter, in a pre-selected orientation, and there continues to be no light passing through. When he slowly turns the additional filter 90 degrees, the light beam is restored to full brightness. The lesson is "how can you unblock the light by addition of even more filtering?"

I use this example because the square wave is simliar to the light. If it's truly a Fourier series, then you can get the filtering effects, but if it's just a switched DC source, then it's going to be like the lighting filtering experiment, but with someone turning the light on and off. I hope I'm making sense.
 

crossman

Senior Member
Location
Southeast Texas
Rattus, I am trying hard to figure this out. Let me ask a question. Concerning the diagram below, we can measure the average power at locations 1 and locations 2. Which of the following would be correct, concerning average power?

Loc1 is greater than Loc2
Loc1 is equal to Loc2
Loc1 is less than Loc2

Now, same question for Instantaneous power:

Loc1 is greater than Loc2
Loc1 is equal to Loc2
Loc1 is less than Loc2

From that, I may be able to come up with something sensible in my head.

squarewave12.jpg
 

rattus

Senior Member
Winnie is right!

Winnie is right!

bcorbin said:
I think we need to clarify something. Is the square wave actually produced by a fundamental and all of the necessary harmonics? or is it just a DC source switched on and off?

If it is the former, I agree with Winnie...the resultant voltage will be greater than the amplitude of the square wave.

If it's the latter, it won't.

If you ever watch "The Mechanical Universe", with David L. Goodstein of Cal-Tech, he does an amazing (to me at least) experiment sort of along these same lines. He places two polarizing filters in the path of a beam of light. Two demonstrate the interaction of two filters, he rotates one 90 degrees against the other and shows how it gradually reduces the beam from full brightness to completely dark. You're now supposed to think "no light is getting through" Then comes the amazing part. He adds a third filter, in a pre-selected orientation, and there continues to be no light passing through. When he slowly turns the additional filter 90 degrees, the light beam is restored to full brightness. The lesson is "how can you unblock the light by addition of even more filtering?"

I use this example because the square wave is simliar to the light. If it's truly a Fourier series, then you can get the filtering effects, but if it's just a switched DC source, then it's going to be like the lighting filtering experiment, but with someone turning the light on and off. I hope I'm making sense.

Doesn't matter how the square wave is generated. The harmonic content is the same, and the peak of the fundamental is greater than the peak of the square wave. Weird, ain't it?
 

crossman

Senior Member
Location
Southeast Texas
bcorbin said:
I think we need to clarify something. Is the square wave actually produced by a fundamental and all of the necessary harmonics? or is it just a DC source switched on and off?

Thanks for you post, bcorbin. I have often wondered about these "harmonics" and about their reality. Perhaps because of my lack of education, I have a hard time seeing things. As an example, the "third harmonic" triplen current in the neutral. heck, that doesn't come about because of some harmonics. It comes about because of the way the loads switch on and off at certain places in the sine wave. Matter of fact, I don't even think the triplen harmonic is an actual sine wave.

Now, something to look at. Check this drawing. I have a battery. The battery voltage is drawn in red. I have drawn in two sine waves which, when added together, will equal the DC battery voltage. Can we, by any stretch of the imagination, say that those sine wave voltages exist in that battery? With the proper filter, could we get one or the other of those sine waves out of that battery by "blocking" the other one?

Personally, I don't think we could, unless our "filter" was actually a voltage source all by itself first. And I don't think we could call it a "filter" in the sense of our current thread, because it would definitely have to use some energy to make it function. And also, that kind of "filter" isn't getting the sine wave out of the battery, it is creating the sine wave itself.

sine.jpg
 

winnie

Senior Member
Location
Springfield, MA, USA
Occupation
Electric motor research
Okay, the day is winding down here. Thanks for the brief vacations; this is an interesting puzzle to look at.

Bcorbin, that is not how harmonic analysis works. Once you have a square wave, you have a square wave, and it doesn't matter how it was generated, the harmonic content is the same.

Part of the confusion (my own included) is that we keep saying 'the voltage', rather than remembering that with the circuit as described there are several different voltages to consider. If we don't specify which two points we are measuring the voltage between, then the value of the voltage is meaningless.

Consider the circuit as drawn by crossman. The filter is as defined by rattus; infinite impedance to any of the harmonics, zero impedance to fundamental. The voltage at the two input terminals to the filter is a square wave, and the instantaneous voltage across this filter is either +Vb or -Vb (depending upon where in the cycle you are and how you select your terminals). The voltage across the resistor is a sine wave, with a peak value of +-4/pi*Vb

Nothing has been magically created; this is the nature of the filter. Even though the filter is 'ideal' and 'lossless', by the definition of its frequency response it must be storing some energy.

Rather than considering an ideal filter, lets instead consider a circuit built with real components. Use the same battery and DPDT switcher. But now instead of an ideal filter, have a simple capacitor and resistor.

Start with the capacitor discharged, and turn everything on. The capacitor starts charging up, just like any RC circuit connected to a battery Suppose the period of the square wave is much longer than the RC time constant. The capacitor essentially charges all the way up to Vb and current flow falls to zero. But then the switch toggles, and for a moment the voltage across the resistor is 2*Vb.

The capacitor in series with the resistor is a high pass filter, and the spiky waveform with 2*Vb peaks is the high frequency component of the square wave.

crossman, in your second diagram, assuming ideal components, the _average_ power at location 1 and location 2 is equal. The _instantaneous_ power will be unequal, but which is greater will alternate, I believe at 2x the square wave frequency.

Oh, for a fun one to consider, imagine a circuit consisting of an inductor, a capacitor, and a resistor, all in series and supplied by 120V 60Hz. The resistor has a value of 120 ohms. The inductor and capacitor are selected to have a 60Hz impedance of 600 ohms each. What is the current through the circuit, and what is the voltage across the inductor?

-Jon
 
Status
Not open for further replies.
Top