Integrating square to triangle?

Click For Summary

Discussion Overview

The discussion revolves around integrating a square wave using an operational amplifier to derive a triangle wave output. Participants are exploring the mathematical approach to determine resistor and capacitor values for achieving a specific output amplitude and frequency.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant presents the formula for the output voltage of an op-amp integrator and describes their attempts to integrate a square wave, noting that the result is zero due to the symmetry of the wave.
  • Another participant suggests that the integral should be calculated from 0 to a variable time t rather than over a complete cycle, indicating that this would yield a function of t that represents the triangle wave.
  • A participant points out a formatting issue with the use of the Greek letter tau in the mathematical expressions, suggesting that it may have been misrepresented in the forum.
  • One participant expresses confusion about how to derive a specific ratio for resistor and capacitor values, acknowledging that they can be arbitrary as long as their product meets the required output specifications.
  • Another participant advises that arbitrary values can be chosen for R and C, emphasizing that the product of the two should yield the desired result.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach to derive the resistor and capacitor values, and there is ongoing confusion regarding the integration process and its implications for the output waveform.

Contextual Notes

There are limitations in the discussion regarding the assumptions made about the integration process and the dependence on the definitions of the waveforms involved. The mathematical steps for deriving the ratio of R and C remain unresolved.

Exulus
Messages
50
Reaction score
0
Hi guys, I need a bit of help with this. I've got an op-amp and the standard formula:

[itex]V_{out} = -\frac{1}{RC}\int V_{in} dt[/itex]

And i need to integrate a square wave from it in order to determine some capacitor/resistor values to get an output amplitude of 5V and freq 200Hz (triangle wave). Every time i try to do it i end up getting 0 as an answer (which is kind of logical, considering one half of the cycle is the negative of the other). For example:
[itex]V(t) = V[/itex] for [itex]0 \leq t \leq 0.0025[/itex]
[itex]V(t) = -V[/itex] for [itex]0.0025 \leq t \leq 0.005[/itex]

[itex]V_{out} = -\frac{1}{RC} [ \int_{0}^{0.0025}Vdt - \int_{0.0025}^{0.005}Vdt][/itex]

[itex]V_{out} = -\frac{1}{RC} (0.0025V - (0.005V - 0.0025V)) = 0[/itex]
How can i get around this problem? Cheers.
 
Engineering news on Phys.org
Exulus said:
Hi guys, I need a bit of help with this. I've got an op-amp and the standard formula:

[itex]V_{out} = -\frac{1}{RC}\int V_{in} dt[/itex]

And i need to integrate a square wave from it in order to determine some capacitor/resistor values to get an output amplitude of 5V and freq 200Hz (triangle wave). Every time i try to do it i end up getting 0 as an answer (which is kind of logical, considering one half of the cycle is the negative of the other). For example:
[itex]V(t) = V[/itex] for [itex]0 \leq t \leq 0.0025[/itex]
[itex]V(t) = -V[/itex] for [itex]0.0025 \leq t \leq 0.005[/itex]

[itex]V_{out} = -\frac{1}{RC} [ \int_{0}^{0.0025}Vdt - \int_{0.0025}^{0.005}Vdt][/itex]

[itex]V_{out} = -\frac{1}{RC} [ \int_{0}^{0.0025}Vdt - \int_{0.0025}^{0.005}Vdt][/itex]



[itex]V_{out}(t) = -\frac{1}{RC} (0.0025V - (0.005V - 0.0025V)) = 0[/itex]
How can i get around this problem? Cheers.

If you calculate the integral for an entire cycle of the wave you get the area under the curve that is of course 0. What you want is not the integral of one period, but the integral from 0 to a time t, that is a function of t.
[itex]V_{out}(t) = -\frac{1}{RC} [ \int_{0}^{t}V(τ)dτ[/itex]
The function Vout(t) is a triangle wave.
If in the function Vout(t) you replace t by 0.005 you get 0, the value of the integral you have calculated.

edited to inform:
I don't know what happened. Where appears the number 964, there should be the greek letter τ (tau)
 
Last edited by a moderator:
SGT, it looks like you used the symbol for tau; however, you have to use \tau in latex. Maybe the latex code on the server messed things up here... 964 is the HTML reference to the greek letter tau.
 
SGT said:
If you calculate the integral for an entire cycle of the wave you get the area under the curve that is of course 0. What you want is not the integral of one period, but the integral from 0 to a time t, that is a function of t.
[itex]V_{out}(t) = -\frac{1}{RC} [ \int_{0}^{t}V(\tau)d\tau[/itex]
The function Vout(t) is a triangle wave.
If in the function Vout(t) you replace t by 0.005 you get 0, the value of the integral you have calculated.

Since I cannot anymore edit my previous post, I am posting again with the corrections provided by faust9. Thank you, Faust.
 
Cheers, i still really don't get what i need to do though. I've got the function for a square wave as stated above, but how do i go about finding an expression for R and C? I know they can pretty much be unlimited as i will just get a ratio between them but i don't really see how i can go about getting that ratio...im completely lost :(
 
You just choose some arbitrary values, J. Doesn't matter as long as the product of the two makes the right number.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
Replies
11
Views
3K
Replies
0
Views
2K
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
42
Views
4K
Replies
49
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
6
Views
3K
  • · Replies 10 ·
Replies
10
Views
1K