# sine wave and square wave time constant

Discussion in 'Math' started by Thevenin's Planet, Mar 13, 2011.

1. ### Thevenin's Planet Thread Starter Active Member

Nov 14, 2008
183
2
hello

How is it that the same equations can be use to calculate sine wave and square wave time constant ? Since they are different at 90 degree.That is the sine wave instantly changes direction toward zero and the square wave pauses for some time much more then the sine wave before decreasing back to zero volts.

2. ### Wendy Moderator

Mar 24, 2008
21,600
2,977
Actually, there is no degree difference between them, it is what you set it to be. Phase and amplitude of the harmonics is very important for the shape of a wave, but the fundamental wave, the sine wave, is still present in the square wave. If a square wave and sine wave are in phase, the fundamental sine wave within the square wave is also in phase.

The math that describes this is Fourier Analysis.

The term time constant doesn't really apply, I suspect you are referring to the period, the amount of time it takes for a waveform to complete on cycle. Time constant usually refers to something like a RL or RC circuit.

3. ### Thevenin's Planet Thread Starter Active Member

Nov 14, 2008
183
2
Hi

Yes, that is what am trying to understand,that is the time constant of a RC or LC circuit.Referring to the rise time in a capacitor that is corresponding to the rise time of a sine wave, in which, the time it take the signal to reach 90 degrees,would that be considered the pulse width for the sine wave? Since the pulse width and the time constant must approximately be equal to charge and discharge the component satisfactorily.I have noticed that pulse width is used constantly with square waves but not with sine waves,but rather period ( T=1/F) is use with sine waves.

Last edited: Mar 14, 2011
4. ### Wendy Moderator

Mar 24, 2008
21,600
2,977
I think what you are referring to is phase shift. A sine wave will be shifted. The fundamental sine wave in a square wave is shift the same amount. However, a RC circuit is also a filter. It attenuates the high frequencies (which are numerous in a square wave) more than the low frequencies. It is a integration function, same as calculus. Add an op amp to make the integration more pure it becomes a triangle waveform, instead of an approximate triangle waveform (a sawtooth).

I have found over the years many circuits can be viewed more than one way, and how you look at the circuit directly affects the way you think of how to use it. The circuit doesn't change, but how you choose to understand it is very important.

An RC circuit is a low pass filter, it is also a phase shifter. It also has an important timing function. It is a component in an analog computer for integration. All of this is true, but one of the concepts may be critical how you interpret a circuit. It is all in your head.

5. ### Thevenin's Planet Thread Starter Active Member

Nov 14, 2008
183
2
Hello

If I am looking at the RC circuit from the point of view that this equation is going to be use to calculate time constant and instant voltage across the capacitor: time constant =( capacitance) ( resistance) and
change=final-start(1-1/e^-t/tau, should I consider, ( for example a 60 hertz sine wave,halve of the period ,that is, P=1/f divide by 2 or 1/60hz =0.01666 seconds divide by 2= .00833 seconds) the time constant equal the 180 degree rise and fall time of the 60 hertz wave?
Would the .00833 seconds be use for the pulse width?

6. ### Wendy Moderator

Mar 24, 2008
21,600
2,977
With a RC circuit it is about amplitude. The phase shift will always be 90°, only the amplitude will change. This directly pertains to it being a calculus integrator. The exact voltage will also depend on where the starting voltage is from the edge of the square wave change. It can be quite complicated, but every text book in the world has the math (predigested calculus equations).

Graphing the function is incredibly easy. 1 RC Time Constant (referred to as a TC) is 63.2% of the total voltage remaining. So 2 time constants are 63.2% of the voltage left after the 1st 63.2%. I made a simple graph for my illustrations, it is too large to display but I'll attach it.

The basic TC concept (which is what you are after) is fundamental of how nature works, and is based off of something called a natural logarithm. It actually associates with a lot more than RC circuits. Wikipedia has a pretty good article on it. The math does depend on natural logs, which is pretty much on every scientific calculator.

Vo=Vt-Vt e^(-TC)

This is the core equation, where

Vo = Voltage out.

Vt = Total voltage difference, this is not necessarily the power supply, it is how much voltage difference there is when you start this process, the starting voltage is assumed to be 0V. For real voltage add the offset after you crunch the numbers. Life is so much simpler if the starting voltage is 0V, but that may not be the case.

e = natural log.

TC = Time Constant, in this case R X C.

I'm a math brick. I learned all of this over thirty <mumble> years ago, and haven't really used it much. When I was graphing the attached RC curve I had to reread the Wiki article to get the math. 5 TC is 99.3% of a full charge, and usually considered complete.

http://en.wikipedia.org/wiki/Time_constant

http://en.wikipedia.org/wiki/RC_time_constant

File size:
9.4 KB
Views:
65
7. ### Thevenin's Planet Thread Starter Active Member

Nov 14, 2008
183
2

You must have misunderstood what I was asking in the above thread.To be more clearly, A sine wave moves through a 360 degree path.It begins at 0 degree,to 90 degree,to 180 degrees so on...Should I use the first halve of the sine wave cycle,that is, 0 to 180 degrees to be an image of a square wave in which to be the rise to voltage limit and followed with the decay of voltage to zero ? Can I understand this to be a pulse width to calculate the first time constant, the charge and discharge of the capacitor?

8. ### Wendy Moderator

Mar 24, 2008
21,600
2,977
The sine wave will shift phase, but you won't be able to get a full 180°. The square wave will react differently, in the process of being converted to a triangle wave it will be a constant 90°, the amplitude will be what changes.

As to the basic phase shift,

9. ### Thevenin's Planet Thread Starter Active Member

Nov 14, 2008
183
2
hi

This was not an exactly pure math question but that which the math represents, thanks .

10. ### Wendy Moderator

Mar 24, 2008
21,600
2,977
I've done what I can, phase shift has absolutely nothing to do with timing, which is what you were asking about initially. It goes back to the multiple concepts I talked about earlier, how you look at a circuit affects how you can use it.

For timing it is all about RC charge curves. It is fundamental. To use RC for time you start with the TC, then figure out the transition voltages. A Schmitt Trigger is ideally suited for this, since it has hard voltage thresh holds that will translate a rate of change into digital signals.

The link I gave you for the AAC book will allow you to calculate phase shift for a specific circuit, and it has decent illustrations to show how it works. While you can express phase shift delay in seconds, the convention is in degrees (or radians). Are you wanting to figure out how to translate phase shift into delay? There is an old mnemonic for which direction phase shift goes.

ELI the ICE man.

Voltage Leads Current (The L is for an inductor, E is voltage, I is current)

Current Leads Voltage (The C is for capacitance, E is voltage, I is current)

The phase shift is what creates reactance, the resistance to AC current flow.

Last edited: Mar 16, 2011
11. ### Wendy Moderator

Mar 24, 2008
21,600
2,977
A quick side trip. Math describes things and their physical relationships, with accuracy. It is a tool. I've shown graphs (or the like has graphs) that show what the math represents, this is what a graphs is for.

Math is better than language in that it doesn't vary between users, unlike language. To understand a concept, to really be able to use it, requires the math.