Obtaining Time Constant from a Relaxation Oscillator

• 21-04-11, 21:24
florescent
Obtaining Time Constant from a Relaxation Oscillator
I have a hard time to find a time constant on a relaxation oscillator I have (attached). This is a comparator-based oscillator

I have calculated the transfer function on it. I tried to obtain the time constant from the transfer function, but not easy.

Can anyone help me?
• 22-04-11, 00:02
aryajur
Re: Obtaining Time Constant from a Relaxation Oscillator
Do you want to find out the expression for frequency? What time constant are you looking for?
• 22-04-11, 09:36
LvW
Re: Obtaining Time Constant from a Relaxation Oscillator
I have a hard time to find a time constant on a relaxation oscillator I have (attached). This is a comparator-based oscillator

Does the circuit really oscillate? I am not sure about that.
• 22-04-11, 10:15
kak111
Re: Obtaining Time Constant from a Relaxation Oscillator
Here you find an example

Differential Equation Analysis of comparator-based Relaxation Oscillator

Relaxation oscillator - Wikipedia, the free encyclopedia

KAK
• 22-04-11, 10:31
LvW
Re: Obtaining Time Constant from a Relaxation Oscillator
"Here you find an example
Differential Equation Analysis of comparator-based Relaxation Oscillator"

Yes, that's the classical configuration. However, it's not identical to the circuit from florescent .
LvW
• 22-04-11, 11:07
FvM
Re: Obtaining Time Constant from a Relaxation Oscillator
Quote:

Yes, that's the classical configuration. However, it's not identical to the circuit from florescent .
Obviously it depends on the dimensioning. Also the classical configuration won't oscillate with C=0. But if the network at the -ve input doesn't cancel the overall positive feedback, the circuit can be expected to oscillate. Due to the RC series circuit, the initial condition for the differential equation can't be easily determined. You would need to solve it iteratively.
• 22-04-11, 11:10
aryajur
Re: Obtaining Time Constant from a Relaxation Oscillator
The circuit will oscillate with the voltage on C2 oscillating between (V1+Vdd)/3 and V1/3 assuming the opamp has a rail to rail output. To calculate the time period you need to calculate the C2 capacitor charging time from V1/3 to (V1+Vdd)/3 through the RC network supplied by Vdd and the C2 discharge time from (V1+Vdd)/3 to V1/3 through the RC network with the supply 0 this time.
I haven't derived it myself yet so I am not sure why R1 and C1 are used. Intuitively R1/C1 would just cause C2 to charge faster initially with a time constant of R1||R2 C2 and then would tend towards the time constant R2 C2. So it shortens the time period but I don't understand why go through that trouble and why not just adjust the time constant with the simple relaxation oscillator circuit kak111 points out from wikipedia.
• 22-04-11, 13:49
LvW
Re: Obtaining Time Constant from a Relaxation Oscillator
Quote:

Originally Posted by FvM
Obviously it depends on the dimensioning. Also the classical configuration won't oscillate with C=0. But if the network at the -ve input doesn't cancel the overall positive feedback, the circuit can be expected to oscillate. Due to the RC series circuit, the initial condition for the differential equation can't be easily determined. You would need to solve it iteratively.

Yes, correct. Initially, I have overlooked the second dc source V1 - therefore my doubts.
Without R1-C1 we have the classical relaxation stage, however, R1-C1 brings no additional advantages.
One remark to florescent's question:
Since it is a circuit that operates in a non-linear manner, you cannot expect to derive the time constant from the (linear) transfer function. It seems to be necessary to calculate in the time domain.
• 22-04-11, 16:30
florescent
Re: Obtaining Time Constant from a Relaxation Oscillator
Ok. Thank you for all answers

Of course, I read the Wiki because if you google "relaxation oscillator", the top link is from the Wiki. Nobody can miss it. However, it's not for my case

The C1 is a capacitive sense (it varies). That means the oscillator keeps oscillating in different frequency as the C1 changes. I need to derive "Frequency of oscillation" in this manner

I also used the same circuit from Wiki, which is the most typical relaxation oscillator. If using R2 and C2 only, and C2 is my sensor, the range of the frequency change is less than my circuit under the same delta of capacitance on the sensor. That's why I prefer my circuit.

Since I intend to use a single power supply, the resistor connections on the positive input side is different from the Wiki circuit (two power supplies).

Aryajur, you are right. At the positive input node, the equation is 3Vp=Vdd+Vout. This is different from the Wiki's circuit.

However, I need to get the time constant so that I can predict the oscillation frequency as the C1 changes (in mathematically)

THANK YOU ALL AGAIN

---------- Post added at 15:30 ---------- Previous post was at 15:23 ----------

Additionally, If the mathematical derivation is hard, I am willing to change the connection on the positive input node to the same as the Wiki. Then, the -Vdd=Vss from the two supplies. It now becomes the symmetric charging and discharging. Then, I can use the equation of f=1/[2ln(3)RC]. However, the negative input node has a different connection as in my circuit, I need to replace the RC with my circuit's time constant. Isn't it possible?
• 22-04-11, 19:11
LvW
Re: Obtaining Time Constant from a Relaxation Oscillator
Quote florescent: Additionally, If the mathematical derivation is hard, I am willing to change the connection on the positive input node to the same as the Wiki. Then, the -Vdd=Vss from the two supplies. It now becomes the symmetric charging and discharging. Then, I can use the equation of f=1/[2ln(3)RC]. However, the negative input node has a different connection as in my circuit, I need to replace the RC with my circuit's time constant. Isn't it possible?

Florescent, I am afraid it is not easy to calculate the repetition rate of your circuit.
*At first, you cannot expect a single "time constant" because it is a second order circuit.
*It is not very important if you have single or double supply because your only task is to compare the step response of the capacitive feedback path with a fixed voltage that is determined by the opamp output voltage (resp. the supply rails) and the positive feedback path.
*Switching occurs at the crossover of both voltages.
*Thus, the main task is to determine the step response of the cap. path. This can be accomplished by dividing the passive transfer function of this path bei "s" in order to get the Laplace transform of the step response. This follows from system theory.
*The transfer function is easy to calculate:
H(s)=N(s)/D(s) with N(s)=1+s(R1C1+R2C1) and D(s)=1+s(R1C1+R2C2+R2C1) +s^2(R1R2C1C2)
*This function H(s) must be devided by "s". Then, the step response can be found with the help of the partial fraction method that gives three terms to be added. These terms can be transformed back in the time domain; they easily can be determined with the help of Laplace correspondence tables.
________
Good luck.
LvW
• 23-04-11, 10:34
LvW
Re: Obtaining Time Constant from a Relaxation Oscillator
Quote:

Originally Posted by florescent
However, I need to ..................predict the oscillation frequency as the C1 changes (in mathematically)

FLORESCENT, for my opinion it is an interesting and (as mentioned above) a challenging task to calculate the repetition rate.
By the way, I don't like the term "oscillation frequency" in this context because - for my feeling - only sinusoidal waves have a "frequency".
Nevertheless, perhaps I can recommend to you another and more simple technique to get formula for the step response of the capacitive feedback path. If you are still interested, give notice here.

LvW
• 27-04-11, 16:38
florescent
Re: Obtaining Time Constant from a Relaxation Oscillator
Dear LvW

"Frequency of oscillation" is more accurate to say. One thing that I disagreed with you is "only sinusoidal waves have a "frequency." Any kind of periodic waves is supposed to have frequency (sinusoidal, square, triangle, saw, etc). As long as there is a period that a same wave is repeating, it's considered a frequency. The original wave form that a RC circuit in an oscillator makes is an exponential function by charging and discharging that is a periodic signal (frequency). Only thing the comparator does is convert this signal into square wave. Nonetheless, this is not a hot issue here.

The transfer function I got for my circuit is N(s)=1+s(R1C1+R1C2+R2C2)+s^2(R1R2C1C2), D(s)=2+s(2R1C2+2R2C2-R1C1)-s^2((R1R2C1C2). How could you get yours different? I condiered that the H(s)=Vo/Vdd in this case.

Thank you.
• 27-04-11, 20:32
LvW
Re: Obtaining Time Constant from a Relaxation Oscillator
Florescent, as far as the definition of the term „frequency“ is concerned you may have noticed that I wrote „I don't like the term "oscillation frequency" in this context“. But – of course – you are free to disagree with my preferences.
* A squarewave with a „frequency“ of 1 kHz consists of several other frequencies (3, 5, 7... kHz). Are you really happy with such a formulation?
*In radar, should the number of pulses that occur each second to be defined as "pulse frequency“ (instead of repetition rate")? I am afraid there is a confusion with the transmission frequency, which is determined by the rate at which sinusoidal cycles are repeated within the transmitted pulse.
* Perhaps you see now, why it may make sense – at least in the area of communication - to discriminate between „frequency“ and „repetition rate“.
* Did you never hear about the sampling rate? I know, several people (incorrectly?) use the term "sampling frequency".
* What is the opinion of other forum members?
________________________________________
Regarding your transfer function I am somewhat confused. What do you mean with Vo/Vdd ?
Do you know the meaning of a transfer function in the s-domain? Vdd is a supply voltage!
As I have mentioned, my formula is the transfer function for the capacitive feedback function only. That's what really matters.

LvW

---------- Post added at 20:32 ---------- Previous post was at 19:08 ----------

PS: Definitely, your transfer function is wrong (not realizable) since it has a minus sign in the denominator.