Author Topic: Square-triangular wave generator - Math  (Read 2541 times)

0 Members and 6 Guests are viewing this topic.

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Square-triangular wave generator - Math
« on: June 13, 2016, 06:29:00 pm »
Hello,

here I have a schmitt trigger where the output is connected to an integrator and for which the output is connected back to the same schmitt trigger.



How do I calculate the amplitude and frequency of the signals at v1 and v2?

The amplitude at v1 is 15 V. To get other parameters is hard because it's a closed loop.

Thank you for your help.
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3523
  • Country: it
Re: Square-triangular wave generator - Math
« Reply #1 on: June 13, 2016, 07:33:26 pm »
the amplitude of the triangle wave will be the difference of the schmitt trigger threshold voltages, i.e. C is charged until V2 is equal to Vth+, at which point the shmitt trigger outputs low so the capacitor is charged with current in the opposite direction until v2 is equal to Vth-, then it get again charged in the opposite direction and so on...

current across C will be -V1/R. with the current and the capacitance you calculate the chargin time, then you get the frequency.
 
The following users thanked this post: nForce

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2116
Re: Square-triangular wave generator - Math
« Reply #2 on: June 13, 2016, 08:37:01 pm »
The trip threshold for OP1 is always 0V, so it will switch state when \$ \mp \frac{V_2}{R_1} = \pm \frac{V_1}{R_2}\$. The time constant can be worked out by calculating how long it takes the integrator to swing between the two trip points.
« Last Edit: June 13, 2016, 08:43:42 pm by Andy Watson »
 
The following users thanked this post: nForce

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Square-triangular wave generator - Math
« Reply #3 on: June 13, 2016, 10:01:21 pm »
The integrator current is set by R at input of integrator, and is
I = Vout_comparator /  R

So Q = C x V or I = C dV/dT or dT = ( C x dV ) / I

From this you can compute period by computing ramp up T and ramp
down T.


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Square-triangular wave generator - Math
« Reply #4 on: June 14, 2016, 12:26:12 pm »
current across C will be -V1/R.

Why do we here neglect the impedance of a capacitor?

dT = ( C x dV ) / I

How do we here consider dV? Because the voltage across the capacitor will vary with time. Do we use an average value?



Let's say we have these values:
C = 1 uF
R1 = 10 K
R = R2 = 100 K

So for Schmitt trigger we get the treshold = 15V * (10K / 110K) = 1.36 V
With this we get that the amplitude of triangle wave peak to peak is 2 * 1.36 V =  2.72 V
The amplitude peak to peak at v1 = 30 V

dT = ( C x dV ) / I
T = (0.1 uF * V?)/ 0.15 A
T is for charging up, because it's simetrical we have for one period 2*T.

And finally the frequency is 1 / (2*T).

Is this correct? Thank you.
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2116
Re: Square-triangular wave generator - Math
« Reply #5 on: June 14, 2016, 12:56:40 pm »
The configuration of this circuit is such that OP2 will be doing whatever it can to maintain its negative input at 0V (i.e. same as the positive input). The negative input is a virtual ground - this means that the current through R is define by V1/R. The only path (assuming a good op-amp) for this current to take is to charge or discharge C. So you are dealing with the basic relationship(s) between current, voltage, time and capacity of the capacitor - impedance does not figure.

Your calculated current is a few order of magnitude out, but otherwise Ok.
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Square-triangular wave generator - Math
« Reply #6 on: June 14, 2016, 02:47:19 pm »
Thank you, but how much is dV then?
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2116
Re: Square-triangular wave generator - Math
« Reply #7 on: June 14, 2016, 03:45:29 pm »
Thank you, but how much is dV then?

Here,  somebody has already calculated it ;)

So for Schmitt trigger we get the treshold = 15V * (10K / 110K) = 1.36 V
With this we get that the amplitude of triangle wave peak to peak is 2 * 1.36 V =  2.72 V

Although, I think that should be \$ V_1 \frac{R2}{R1}\$, not \$ V_1 \frac{R2}{ R1 + R2} \$, which I make to be about 3V.


 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Square-triangular wave generator - Math
« Reply #8 on: June 14, 2016, 03:59:51 pm »
Hmm,...

We are calculating the voltage on R1. So for Schmitt trigger, it's V1 * (R1/(R1+R2)). The ratio that is.

Oh yes, as you said the voltage is zero at the inverting input as well on the non-inverting. So the v2 is also equal to the voltage across the capacitor.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf