Goto page 1, 2, 3, 4, 5, 6 Next
Harold Larsen
Guest
Sun Mar 07, 2010 4:12 am
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even, will I get ALL harmonics if I mix
the two waveforms?
It looks like a cross between a squarewave and sinewave.
I have not seen any tech references to the practical value of this.
Does it have any?
For example, to roughly approximate a sinewave without filtering.
Harold Larsen
Phil Allison
Guest
Sun Mar 07, 2010 4:31 am
"Harold Larsen"
Quote:
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even,
** Sorry - that is WRONG .
A triangle wave contains only odd harmonics too.
http://en.wikipedia.org/wiki/Triangle_wave
A "sawtooth" wave contains all integer harmonics.
..... Phil
Ron Tanner
Guest
Sun Mar 07, 2010 5:04 am
On Sun, 7 Mar 2010 14:31:48 +1100, "Phil Allison" <phil_a_at_tpg.com.au>
wrote:
Quote:
"Harold Larsen"
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even,
** Sorry - that is WRONG .
A triangle wave contains only odd harmonics too.
http://en.wikipedia.org/wiki/Triangle_wave
A "sawtooth" wave contains all integer harmonics.
OK thanks for the pull-up, but how about using a triangle-square wave
mix, in place of a filter, to simulate a sinewave .
I have not seen that method applied or described anywhere, but it
makes a fair approximation, at least to my eye.
Harold Larsen
Phil Allison
Guest
Sun Mar 07, 2010 5:10 am
"Ron Tanner"
"Phil Allison"
Quote:
"Harold Larsen"
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even,
** Sorry - that is WRONG .
A triangle wave contains only odd harmonics too.
http://en.wikipedia.org/wiki/Triangle_wave
A "sawtooth" wave contains all integer harmonics.
OK thanks for the pull-up, but how about using a triangle-square wave
mix, in place of a filter, to simulate a sinewave .
I have not seen that method applied or described anywhere, but it
makes a fair approximation, at least to my eye.
** Maybe you need better eyes.
Ever noticed how sine waves are flat topped and pass through zero at a 45
degree angle ?
Not much like your hut with pitched roof wave.......
...... Phil
D from BC
Guest
Sun Mar 07, 2010 5:21 am
In article <4b9324ee.4432562_at_news.tpg.com.au>, rontanner_at_esterbrook.com
says...
Quote:
On Sun, 7 Mar 2010 14:31:48 +1100, "Phil Allison" <phil_a_at_tpg.com.au
wrote:
"Harold Larsen"
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even,
** Sorry - that is WRONG .
A triangle wave contains only odd harmonics too.
http://en.wikipedia.org/wiki/Triangle_wave
A "sawtooth" wave contains all integer harmonics.
OK thanks for the pull-up, but how about using a triangle-square wave
mix, in place of a filter, to simulate a sinewave .
I have not seen that method applied or described anywhere, but it
makes a fair approximation, at least to my eye.
Harold Larsen
This reminds of the XR2206 chip that makes square, triangle and sine
using analog technology.
Bitrex
Guest
Sun Mar 07, 2010 6:23 am
Ron Tanner wrote:
Quote:
On Sun, 7 Mar 2010 14:31:48 +1100, "Phil Allison" <phil_a_at_tpg.com.au
wrote:
"Harold Larsen"
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even,
** Sorry - that is WRONG .
A triangle wave contains only odd harmonics too.
http://en.wikipedia.org/wiki/Triangle_wave
A "sawtooth" wave contains all integer harmonics.
OK thanks for the pull-up, but how about using a triangle-square wave
mix, in place of a filter, to simulate a sinewave .
I have not seen that method applied or described anywhere, but it
makes a fair approximation, at least to my eye.
Harold Larsen
You can approximate a sine wave by putting a triangle wave through a
circuit that has a hyperbolic tangent shaped transfer function. The
following circuit (from "Musical Applications of Microprocessors " by
Hal Chamberlin)approximates that function by using the conduction
characteristics of two back to back diodes at low currents:
Triangle in 14V pk-pk
o-------o--------------------
.-. | .-.
| | - | |
1M | | ^ | | 150
'-' | '-'
| | |
| | |
| | |-+
| | |
-o--------o------>|-+ Sine out 1V pk-pk
| |
| | o---------o
.-. | .-.
1M | | | | |
| | V | | 150
'-' - '-'
| - |
---------|-----------
===
GND
(created by AACircuit v1.28.6 beta 04/19/05
www.tech-chat.de)
Though I haven't tried to do it the author claims that with precision
components and adjustment the circuit can be adjusted to under 1%
harmonic distortion. You could do a similar thing with a differential
amplifier or an OTA.
Kevin McMurtrie
Guest
Sun Mar 07, 2010 6:44 am
In article <4b931859.1212000_at_news.tpg.com.au>,
haroldlarsen_at_porterland.com (Harold Larsen) wrote:
Quote:
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even, will I get ALL harmonics if I mix
the two waveforms?
It looks like a cross between a squarewave and sinewave.
I have not seen any tech references to the practical value of this.
Does it have any?
For example, to roughly approximate a sinewave without filtering.
Harold Larsen
Heh, no that doesn't work.
The usual way to approximate a sine wave is to blunt the sharp tips off
a triangle wave with diodes. With enough tweaking it gets very close.
--
I won't see Google Groups replies because I must filter them as spam
Richard Henry
Guest
Sun Mar 07, 2010 7:09 am
On Mar 6, 8:04 pm, rontan...@esterbrook.com (Ron Tanner) wrote:
Quote:
On Sun, 7 Mar 2010 14:31:48 +1100, "Phil Allison" <phi...@tpg.com.au
wrote:
"Harold Larsen"
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even,
** Sorry - that is WRONG .
A triangle wave contains only odd harmonics too.
http://en.wikipedia.org/wiki/Triangle_wave
A "sawtooth" wave contains all integer harmonics.
OK thanks for the pull-up, but how about using a triangle-square wave
mix, in place of a filter, to simulate a sinewave .
I have not seen that method applied or described anywhere, but it
makes a fair approximation, at least to my eye.
Harold Larsen
Why would you need to simulate a sine wave? It is well characterized
in the literature and there are lots of extra ones lying around
unused.
Ban
Guest
Sun Mar 07, 2010 9:12 am
Bitrex wrote:
Quote:
You can approximate a sine wave by putting a triangle wave through a
circuit that has a hyperbolic tangent shaped transfer function. The
following circuit (from "Musical Applications of Microprocessors " by
Hal Chamberlin)approximates that function by using the conduction
characteristics of two back to back diodes at low currents:
Triangle in 14V pk-pk
o-------o--------------------
.-. | .-.
| | - | |
1M | | ^ | | 150
'-' | '-'
| | |
| | |
| | |-+
| | |
-o--------o------>|-+ Sine out 1V pk-pk
| |
| | o---------o
.-. | .-.
1M | | | | |
| | V | | 150
'-' - '-'
| - |
---------|-----------
===
GND
(created by AACircuit v1.28.6 beta 04/19/05
www.tech-chat.de)
Though I haven't tried to do it the author claims that with precision
components and adjustment the circuit can be adjusted to under 1%
harmonic distortion. You could do a similar thing with a differential
amplifier or an OTA.
If this circuit is really published the way you drew it, it shows how little
a uP guy knows about analogue. The distortion may be even higher than of the
triangle wave at the input, and <1% you can get only with 6 turn points if
adjusted well.
A differential transistor stage OTOH is capable of sine-shaping with a
minimum of 1.3% THD, with an additional clipping of the tops you can reach
almost 0.4%.
Another possibility is to develop the sine function into a power series
sinx = x - x^3/3! + x^5/5! - ... using only the first 2 terms you get 0.6%
THD, but you need 2 analog multipliers for that. Slightly modifying the
coefficients even 0.25% can be reached. This is very useful if the sin is to
be differentiated later.
ciao Ban
Martin Brown
Guest
Sun Mar 07, 2010 10:26 am
Harold Larsen wrote:
Quote:
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even, will I get ALL harmonics if I mix
the two waveforms?
It looks like a cross between a squarewave and sinewave.
Not in this world it doesn't. Both contain only the odd harmonics but in
varying amounts. You get from square to triangle by integrating it.
_ _ _
_| |_| |_| |_
A square wave is sum (-1)^(2n+1).sin((2n+1)wt)/(2n+1) n=0 .. inf
When you integrate a square wave you get a triangle wave - usually
available off the timing capacitor with a bit of buffering.
/\ /\ /\
\/ \/ \/
The expression for the square wave can be integrated to give:
A triangle wave is sum sin((2n+1)wt)/(2n+1)^2 n=0 .. inf
You could take the linear combination of triangle + square/3 to null out
the third harmonic but the waveform would look nothing like a sine wave
because of all the other uncancelled higher harmonics.
And the zero crossing would be perpendicular which is not right.
Quote:
I have not seen any tech references to the practical value of this.
Does it have any?
None at all.
Quote:
For example, to roughly approximate a sinewave without filtering.
A much better way ISTR originally poineered by HP is to take a triangle
wave and apply diode shaping to it. First order is to just clip the top
off and the next order chamfers the rough edges then a low pass filter.
Neater methods by varying gain with amplitude exist too. Although the
neatest of all is probably based on log shaping. Almost all of these
tricks have been displaced by direct digital synthesis now.
Natsemi has an app note that reviews sine generation methods that you
might find interesting:
http://www.nalanda.nitc.ac.in/industry/appnotes/Natsemi/AN-263.pdf
And venerable Intersil ICL8038 part that first embodied square, triangle
and a sinewave shaper on one chip is still online at
http://www.intersil.com/data/fn/fn2864.pdf
Regards,
Martin Brown
Robert Baer
Guest
Sun Mar 07, 2010 10:38 am
Harold Larsen wrote:
Quote:
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even, will I get ALL harmonics if I mix
the two waveforms?
It looks like a cross between a squarewave and sinewave.
I have not seen any tech references to the practical value of this.
Does it have any?
For example, to roughly approximate a sinewave without filtering.
Harold Larsen
Use no filtering and only the triangle waveform: pass thru what 40-50
years ago was called a DFG (diode function generator) at least 16
segments for each polarity; THD result can be quite low (less than 0.5%
aka 46dB THD.
Robert Baer
Guest
Sun Mar 07, 2010 10:41 am
Harold Larsen wrote:
Quote:
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even, will I get ALL harmonics if I mix
the two waveforms?
It looks like a cross between a squarewave and sinewave.
I have not seen any tech references to the practical value of this.
Does it have any?
For example, to roughly approximate a sinewave without filtering.
Harold Larsen
Correction: SIX diodes for each polarity, NOT 16 (remembered
incorrectly).
Robert Baer
Guest
Sun Mar 07, 2010 10:42 am
Ron Tanner wrote:
Quote:
On Sun, 7 Mar 2010 14:31:48 +1100, "Phil Allison" <phil_a_at_tpg.com.au
wrote:
"Harold Larsen"
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even,
** Sorry - that is WRONG .
A triangle wave contains only odd harmonics too.
http://en.wikipedia.org/wiki/Triangle_wave
A "sawtooth" wave contains all integer harmonics.
OK thanks for the pull-up, but how about using a triangle-square wave
mix, in place of a filter, to simulate a sinewave .
I have not seen that method applied or described anywhere, but it
makes a fair approximation, at least to my eye.
Harold Larsen
You have a crappy "eye"; no cigar - in fact no tobacco!
Robert Baer
Guest
Sun Mar 07, 2010 10:44 am
Richard Henry wrote:
Quote:
On Mar 6, 8:04 pm, rontan...@esterbrook.com (Ron Tanner) wrote:
On Sun, 7 Mar 2010 14:31:48 +1100, "Phil Allison" <phi...@tpg.com.au
wrote:
"Harold Larsen"
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even,
** Sorry - that is WRONG .
A triangle wave contains only odd harmonics too.
http://en.wikipedia.org/wiki/Triangle_wave
A "sawtooth" wave contains all integer harmonics.
OK thanks for the pull-up, but how about using a triangle-square wave
mix, in place of a filter, to simulate a sinewave .
I have not seen that method applied or described anywhere, but it
makes a fair approximation, at least to my eye.
Harold Larsen
Why would you need to simulate a sine wave? It is well characterized
in the literature and there are lots of extra ones lying around
unused.
....and one does not need a movie star to SINE the autograph!
Bitrex
Guest
Sun Mar 07, 2010 10:48 am
Ban wrote:
Quote:
Bitrex wrote:
You can approximate a sine wave by putting a triangle wave through a
circuit that has a hyperbolic tangent shaped transfer function. The
following circuit (from "Musical Applications of Microprocessors " by
Hal Chamberlin)approximates that function by using the conduction
characteristics of two back to back diodes at low currents:
Triangle in 14V pk-pk
o-------o--------------------
.-. | .-.
| | - | |
1M | | ^ | | 150
'-' | '-'
| | |
| | |
| | |-+
| | |
-o--------o------>|-+ Sine out 1V pk-pk
| |
| | o---------o
.-. | .-.
1M | | | | |
| | V | | 150
'-' - '-'
| - |
---------|-----------
===
GND
(created by AACircuit v1.28.6 beta 04/19/05
www.tech-chat.de)
Though I haven't tried to do it the author claims that with precision
components and adjustment the circuit can be adjusted to under 1%
harmonic distortion. You could do a similar thing with a differential
amplifier or an OTA.
If this circuit is really published the way you drew it, it shows how little
a uP guy knows about analogue. The distortion may be even higher than of the
triangle wave at the input, and <1% you can get only with 6 turn points if
adjusted well.
A differential transistor stage OTOH is capable of sine-shaping with a
minimum of 1.3% THD, with an additional clipping of the tops you can reach
almost 0.4%.
Another possibility is to develop the sine function into a power series
sinx = x - x^3/3! + x^5/5! - ... using only the first 2 terms you get 0.6%
THD, but you need 2 analog multipliers for that. Slightly modifying the
coefficients even 0.25% can be reached. This is very useful if the sin is to
be differentiated later.
ciao Ban
Yep, the circuit is exactly the way it's drawn in the book - the FET is
listed as a 2N3819. When I built the circuit I think it gave me a THD
of like 10%, so I was wondering what black magic the author was using to
get it below 1%. Looking at it more carefully I can understand why,
it's an approximation to an approximation - the curve of the hyperbolic
tangent function (e^2x -1)/(e^2x + 1) which approximates a sine is
itself approximated by an ordinary diode law exponential. I think the
reason it was included is that it's cheap: at the time the book was
published (1980) OTAs probably cost the equivalent of $10 each and if
someone were assembling a "voice per board" type synthesizer with a lot
of voices the cost of an OTA and assorted components to make a sine wave
for each voice might become prohibitive. In a synthesizer perhaps they
figure the signal is just going to be stuffed through a low pass VCF
anyhow so the THD is not such a big deal.
I like the idea of using a Taylor series to generate a sine transfer
function; what kind of multiplier would you use to raise the input to
the 3rd and 5th powers? Some kind of translinear network?
Goto page 1, 2, 3, 4, 5, 6 Next