EDAboard.com | EDAboard.eu | EDAboard.de | EDAboard.co.uk | RTV forum PL | NewsGroups PL

Square + triangle = sine (almost)

elektroda.net NewsGroups Forum Index - Electronics Design - Square + triangle = sine (almost)

Goto page Previous  1, 2, 3, 4, 5, 6  Next

Fred Bartoli
Guest

Tue Mar 09, 2010 9:22 am   



MooseFET a écrit :
Quote:
On Mar 8, 8:28 am, "Tim Williams" <tmoran...@charter.net> wrote:
"MooseFET" <kensm...@rahul.net> wrote in message

news:c968f0a3-64bc-46e1-8a14-7b36a8e75d0f_at_b9g2000pri.googlegroups.com...

If you use a quad comparator, you can do some interesting stuff. With
just 2 more comparators, you can make this:
------ ------
--- --- --- ---
------
I recollect something from Don Lancaster about Magic Sinewaves and how you
can get arbitrarily low harmonics from certain optimal patterns of on and
off, given sufficiently accurate timing, and I suppose some sort of
filtering. I never did figure out if it's supposed to be a tristate
waveform (as above)

The waveform I drew can be made by simply adding two pulse trains
with
different duty cycles. The fact that 3 time 60 degrees is 180 degrees
is how you can get the 3rd harmonic to go away.

If you use more steps, you can get the first N harmonics to drop to
zero. The same is true for line segments instead of steps.


Which is nothing more than the analog variant of a transversal filter
that you can build from a divider, a shift register and a few weighted
summing resistors.


--
Thanks,
Fred.

Tim Williams
Guest

Tue Mar 09, 2010 10:17 am   



"George Herold" <ggherold_at_gmail.com> wrote in message
news:b7230e3e-874b-470b-b02a-a814d8409657_at_z35g2000yqd.googlegroups.com...
Quote:
That's Great! Thanks, I tried to filter a square wave into a sine and
was deeply disappointed. (If you filtered it hard enough there was
just not enough left.)

You need a high Q filter, of course. My induction heater makes an excellent
sine wave from a fairly sharp square input (t_r = 100ns, so there's plenty
of harmonics). The tank has Q around 10-20 depending on load, and obviously
enough, since the fundamental is key to induction heating, there is plenty
of signal left. :-)

If you filtered a square with, say, a row of RCRC's, you'd get terrible
results because the asymptotic attenuation is pretty weak and the knee is
too soft (you can't make a Q > 1/3 or something like that). In time-domain
terms, you're turning square into triangle with one RC (integrator), then
triangle into parabola, then parabola into cubic, and so on. Eventually
you'll get a fair approximation of a sine wave (i.e., the harmonics are
attenuated sufficiently), but because you need to be in the asymptotic
region to get useful attenuation of the harmonics, your signal of interest
disappears almost as much.

Tim

--
Deep Friar: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms

Jim Thompson
Guest

Tue Mar 09, 2010 3:59 pm   



On Mon, 08 Mar 2010 21:42:22 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

Quote:
On Mon, 08 Mar 2010 09:25:15 -0700, Jim Thompson <To-Email-Use-The-Envelope-Icon_at_My-Web-Site.com> wrote:

On Mon, 08 Mar 2010 00:01:44 -0800, Muzaffer Kal <kal_at_dspia.com
wrote:

On Sun, 07 Mar 2010 23:11:20 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Sat, 6 Mar 2010 20:21:10 -0800, D from BC <myrealaddress_at_comic.com> wrote:

In article <4b9324ee.4432562_at_news.tpg.com.au>, rontanner_at_esterbrook.com
says...

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.

Sure enough, as does the ICL8038. Part of the question is how it is done.

The datasheet at http://www.intersil.com/data/FN/FN2864.pdf has a
pretty good schematic and explanation which shows how it's done.

Yep. "Piecewise-Linear", aka break-point analysis... taught in better
engineering schools Wink

...Jim Thompson

I first saw it in a synchro to digital converter about 1973. I had to think
hard for a while before i "got" it.

The only place I can remember using it in an actual product was for
linearizing a flat-face CRT sweep (RADAR)... and there it was
piecewise _curve_ fitting.

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

The only thing bipartisan in this country is hypocrisy

Phil Hobbs
Guest

Tue Mar 09, 2010 4:10 pm   



On 3/9/2010 9:59 AM, Jim Thompson wrote:
Quote:
On Mon, 08 Mar 2010 21:42:22 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Mon, 08 Mar 2010 09:25:15 -0700, Jim Thompson<To-Email-Use-The-Envelope-Icon_at_My-Web-Site.com> wrote:

On Mon, 08 Mar 2010 00:01:44 -0800, Muzaffer Kal<kal_at_dspia.com
wrote:

On Sun, 07 Mar 2010 23:11:20 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Sat, 6 Mar 2010 20:21:10 -0800, D from BC<myrealaddress_at_comic.com> wrote:

In article<4b9324ee.4432562_at_news.tpg.com.au>, rontanner_at_esterbrook.com
says...

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.

Sure enough, as does the ICL8038. Part of the question is how it is done.

The datasheet at http://www.intersil.com/data/FN/FN2864.pdf has a
pretty good schematic and explanation which shows how it's done.

Yep. "Piecewise-Linear", aka break-point analysis... taught in better
engineering schools Wink

...Jim Thompson

I first saw it in a synchro to digital converter about 1973. I had to think
hard for a while before i "got" it.

The only place I can remember using it in an actual product was for
linearizing a flat-face CRT sweep (RADAR)... and there it was
piecewise _curve_ fitting.

...Jim Thompson

Breakpoint amps are nearly always a crutch. One poor guy I tried to
help (15 years back) ignored my advice and wound up with a multi-diode
breakpoint amp stuck inside a crystal oven to keep the breakpoints from
going all over the place with temperature. Blech. (It was in a fancy
measurement system, too. Got all sorts of industry awards.)

The Widlar approach (National AN4, Figure Cool uses BJT saturation to make
nice sharp breakpoints that don't drift much. Of course you have to
wait for the transistor to come out of saturation.

About the only good use of breakpoint amps I've seen is inside
complicated FB loops, e.g. to approximately correct for the nonlinearity
of VCOs and heaters. This reduces the variation of loop gain and so
makes frequency compensation easier. Drift and inaccuracy are not a big
problem in those sorts of applications.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net

MooseFET
Guest

Tue Mar 09, 2010 4:35 pm   



On Mar 9, 12:22 am, Fred Bartoli <myname_with_a_dot_inbetw...@free.fr>
wrote:
Quote:
MooseFET a écrit :



On Mar 8, 8:28 am, "Tim Williams" <tmoran...@charter.net> wrote:
"MooseFET" <kensm...@rahul.net> wrote in message

news:c968f0a3-64bc-46e1-8a14-7b36a8e75d0f_at_b9g2000pri.googlegroups.com....

If you use a quad comparator, you can do some interesting stuff.  With
just 2 more comparators, you can make this:
   ------            ------
---      ---      ---      ---
            ------
I recollect something from Don Lancaster about Magic Sinewaves and how you
can get arbitrarily low harmonics from certain optimal patterns of on and
off, given sufficiently accurate timing, and I suppose some sort of
filtering.  I never did figure out if it's supposed to be a tristate
waveform (as above)

The waveform I drew can be made by simply adding two pulse trains
with
different duty cycles.  The fact that 3 time 60 degrees is 180 degrees
is how you can get the 3rd harmonic to go away.

If you use more steps, you can get the first N harmonics to drop to
zero.  The same is true for line segments instead of steps.

Which is nothing more than the analog variant of a transversal filter
that you can build from a divider, a shift register and a few weighted
summing resistors.

It is the same idea but in this case, it is made from a triangle wave
which we have to start with instead of needing to make a higher
frequency
first.


Quote:

--
Thanks,
Fred.


MooseFET
Guest

Tue Mar 09, 2010 4:39 pm   



On Mar 8, 6:48 pm, George Herold <ggher...@gmail.com> wrote:
Quote:
On Mar 8, 8:57 am, MooseFET <kensm...@rahul.net> wrote:



On Mar 7, 4:10 pm, whit3rd <whit...@gmail.com> wrote:

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:
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.
OK thanks for the pull-up, but how about using a triangle-square wave
mix, in place of a filter, to simulate a sinewave .

To generate a square wave and triangle wave together, just hook a
Schmitt trigger to an op amp configured as integrator (resistor from
input to (-) node, feedback capacitor from op amp output to (-) node.
The output of the op amp then is fed to the Schmitt trigger (a '555
does this without the op amp, but its triangle waves are curvey
because of that).

The result is a square wave and a triangle wave, both of constant
amplitude, which changes frequency with a single variable resistor
(the integrator input resistor).

SO, now you want to mix a square and triangle?  If you generate them
by the method above, fundamentals ARE OUT OF PHASE by ninety degrees,
and so are all of the harmonics.  You get neither cancellation nor
reinforcement
by any simple summing.

If you use a quad comparator, you can do some interesting stuff.  With
just 2 more comparators, you can make this:

   ------            ------
---      ---      ---      ---
            ------

It will be in phase with the triangle wave.  It can be made to have no
3rd harmonic fairly easily.  By trading off the 3rd you can have a
reduced
5th.

It is too early in the morning for me to be sure, but I think that if
you
fiddle it just right and add in some of the triangle wave, you can get
low
values for both the 3rd and 5th.

It also seems to me that there should be a way to make a very
nonlinear
PWMing action that when low pass filtered leaves a moderately good
estimate
of a sine wave.  This could allow you to hold the sine wave shape over
perhaps
a couple of decades.- Hide quoted text -

- Show quoted text -

That's neat, are you making a 'few' bit DAC?

The first idea:
The comparators are a few bit ADC and the resistors to make the
waveform are
a few bit DAC.

The second idea:
The idea is that a PWM signal at perhaps a few MHz can be made. This
PWM
signal would be nonlinear with the triangle's voltage and thus make it
into a more rounded shape.

Quote:

George H.


Jim Thompson
Guest

Tue Mar 09, 2010 4:39 pm   



On Tue, 09 Mar 2010 10:10:26 -0500, Phil Hobbs
<pcdhSpamMeSenseless_at_electrooptical.net> wrote:

Quote:
On 3/9/2010 9:59 AM, Jim Thompson wrote:
On Mon, 08 Mar 2010 21:42:22 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Mon, 08 Mar 2010 09:25:15 -0700, Jim Thompson<To-Email-Use-The-Envelope-Icon_at_My-Web-Site.com> wrote:

On Mon, 08 Mar 2010 00:01:44 -0800, Muzaffer Kal<kal_at_dspia.com
wrote:

On Sun, 07 Mar 2010 23:11:20 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Sat, 6 Mar 2010 20:21:10 -0800, D from BC<myrealaddress_at_comic.com> wrote:

In article<4b9324ee.4432562_at_news.tpg.com.au>, rontanner_at_esterbrook.com
says...

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.

Sure enough, as does the ICL8038. Part of the question is how it is done.

The datasheet at http://www.intersil.com/data/FN/FN2864.pdf has a
pretty good schematic and explanation which shows how it's done.

Yep. "Piecewise-Linear", aka break-point analysis... taught in better
engineering schools Wink

...Jim Thompson

I first saw it in a synchro to digital converter about 1973. I had to think
hard for a while before i "got" it.

The only place I can remember using it in an actual product was for
linearizing a flat-face CRT sweep (RADAR)... and there it was
piecewise _curve_ fitting.

...Jim Thompson

Breakpoint amps are nearly always a crutch. One poor guy I tried to
help (15 years back) ignored my advice and wound up with a multi-diode
breakpoint amp stuck inside a crystal oven to keep the breakpoints from
going all over the place with temperature. Blech. (It was in a fancy
measurement system, too. Got all sorts of industry awards.)

The Widlar approach (National AN4, Figure Cool uses BJT saturation to make
nice sharp breakpoints that don't drift much. Of course you have to
wait for the transistor to come out of saturation.

About the only good use of breakpoint amps I've seen is inside
complicated FB loops, e.g. to approximately correct for the nonlinearity
of VCOs and heaters. This reduces the variation of loop gain and so
makes frequency compensation easier. Drift and inaccuracy are not a big
problem in those sorts of applications.

Cheers

Phil Hobbs

Ah, yes! Thanks for the reminder! I also linearized a frequency
hopping VCO for OmniSpectra _many_ years ago... for jumping close to
desired frequency, so the PLL lock was faster... a cavity beast :-)

I would never use _just_ diodes, rather use them with OpAmps or
comparators, such as...

http://analog-innovations.com/SED/ClampForLarkin.pdf

(A Christmas gift, 2007. But he remains a cranky old git :-)

http://analog-innovations.com/SED/LevelDetectAndFollow-LM339.pdf

http://analog-innovations.com/SED/LevelDetectAndFollow-TL431.pdf

http://analog-innovations.com/SED/PerfectDiodeForChargerIsolation.pdf

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

The only thing bipartisan in this country is hypocrisy

Phil Hobbs
Guest

Tue Mar 09, 2010 5:48 pm   



On 3/9/2010 10:39 AM, Jim Thompson wrote:
Quote:
On Tue, 09 Mar 2010 10:10:26 -0500, Phil Hobbs
pcdhSpamMeSenseless_at_electrooptical.net> wrote:

On 3/9/2010 9:59 AM, Jim Thompson wrote:
On Mon, 08 Mar 2010 21:42:22 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Mon, 08 Mar 2010 09:25:15 -0700, Jim Thompson<To-Email-Use-The-Envelope-Icon_at_My-Web-Site.com> wrote:

On Mon, 08 Mar 2010 00:01:44 -0800, Muzaffer Kal<kal_at_dspia.com
wrote:

On Sun, 07 Mar 2010 23:11:20 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Sat, 6 Mar 2010 20:21:10 -0800, D from BC<myrealaddress_at_comic.com> wrote:

In article<4b9324ee.4432562_at_news.tpg.com.au>, rontanner_at_esterbrook.com
says...

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.

Sure enough, as does the ICL8038. Part of the question is how it is done.

The datasheet at http://www.intersil.com/data/FN/FN2864.pdf has a
pretty good schematic and explanation which shows how it's done.

Yep. "Piecewise-Linear", aka break-point analysis... taught in better
engineering schools Wink

...Jim Thompson

I first saw it in a synchro to digital converter about 1973. I had to think
hard for a while before i "got" it.

The only place I can remember using it in an actual product was for
linearizing a flat-face CRT sweep (RADAR)... and there it was
piecewise _curve_ fitting.

...Jim Thompson

Breakpoint amps are nearly always a crutch. One poor guy I tried to
help (15 years back) ignored my advice and wound up with a multi-diode
breakpoint amp stuck inside a crystal oven to keep the breakpoints from
going all over the place with temperature. Blech. (It was in a fancy
measurement system, too. Got all sorts of industry awards.)

The Widlar approach (National AN4, Figure Cool uses BJT saturation to make
nice sharp breakpoints that don't drift much. Of course you have to
wait for the transistor to come out of saturation.

About the only good use of breakpoint amps I've seen is inside
complicated FB loops, e.g. to approximately correct for the nonlinearity
of VCOs and heaters. This reduces the variation of loop gain and so
makes frequency compensation easier. Drift and inaccuracy are not a big
problem in those sorts of applications.

Cheers

Phil Hobbs

Ah, yes! Thanks for the reminder! I also linearized a frequency
hopping VCO for OmniSpectra _many_ years ago... for jumping close to
desired frequency, so the PLL lock was faster... a cavity beast :-)

I would never use _just_ diodes, rather use them with OpAmps or
comparators, such as...

http://analog-innovations.com/SED/ClampForLarkin.pdf

(A Christmas gift, 2007. But he remains a cranky old git :-)

http://analog-innovations.com/SED/LevelDetectAndFollow-LM339.pdf

http://analog-innovations.com/SED/LevelDetectAndFollow-TL431.pdf

http://analog-innovations.com/SED/PerfectDiodeForChargerIsolation.pdf

...Jim Thompson

Try knitting him some mittens this year, maybe? Active diode clamps
have been round for a day or too!

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net

Jim Thompson
Guest

Tue Mar 09, 2010 7:30 pm   



On Mon, 08 Mar 2010 21:40:09 -0500, Phil Hobbs
<pcdhSpamMeSenseless_at_electrooptical.net> wrote:

Quote:
On 3/8/2010 9:07 PM, whit3rd wrote:
On Mar 8, 1:35 pm, Jim Thompson<To-Email-Use-The-Envelope-I...@My-Web-
Site.com> wrote:
On Mon, 08 Mar 2010 16:26:04 -0500, Phil Hobbs

You can do a pretty good job with an LM13700 producing the tanh shape,
and then subtracting off a small amount of the original triangle wave to
get rid of the cusps at the peaks.

The transfer characteristics of a BIPOLAR diff pair IS a TANH
function.

The tricky part is containing the signal within the
temperature-dependent operating range.

Err... did I miss something? I've squinted at the referenced paper,
but
what you want to convert a triangle wave to a sine is sine, not
hyperbolic tangent... the tricky part is that it's not the right
function
and ALSO that it's temperature-dependent.

The only 'pure' way to convert to a sine is to filter somehow.
Motor/flywheel/generator is a pretty good filter... and it
keeps any frequency of sine pure after it comes up to speed.
Alas, there's no non-moving-part flywheel equivalent (high Q
at a large range of frequencies).

See http://electrooptical.net/www/sed/TanhSineShaper.pdf

Cheers

Phil Hobbs

See http://analog-innovations.com/FuncGen.zip Wink Wink Wink

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

The only thing bipartisan in this country is hypocrisy

Don Lancaster
Guest

Tue Mar 09, 2010 9:23 pm   



MooseFET wrote:
Quote:
On Mar 8, 6:48 pm, George Herold <ggher...@gmail.com> wrote:
On Mar 8, 8:57 am, MooseFET <kensm...@rahul.net> wrote:



On Mar 7, 4:10 pm, whit3rd <whit...@gmail.com> wrote:
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:
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.
OK thanks for the pull-up, but how about using a triangle-square wave
mix, in place of a filter, to simulate a sinewave .
To generate a square wave and triangle wave together, just hook a
Schmitt trigger to an op amp configured as integrator (resistor from
input to (-) node, feedback capacitor from op amp output to (-) node.
The output of the op amp then is fed to the Schmitt trigger (a '555
does this without the op amp, but its triangle waves are curvey
because of that).
The result is a square wave and a triangle wave, both of constant
amplitude, which changes frequency with a single variable resistor
(the integrator input resistor).
SO, now you want to mix a square and triangle? If you generate them
by the method above, fundamentals ARE OUT OF PHASE by ninety degrees,
and so are all of the harmonics. You get neither cancellation nor
reinforcement
by any simple summing.
If you use a quad comparator, you can do some interesting stuff. With
just 2 more comparators, you can make this:
------ ------
--- --- --- ---
------
It will be in phase with the triangle wave. It can be made to have no
3rd harmonic fairly easily. By trading off the 3rd you can have a
reduced
5th.
It is too early in the morning for me to be sure, but I think that if
you
fiddle it just right and add in some of the triangle wave, you can get
low
values for both the 3rd and 5th.
It also seems to me that there should be a way to make a very
nonlinear
PWMing action that when low pass filtered leaves a moderately good
estimate
of a sine wave. This could allow you to hold the sine wave shape over
perhaps
a couple of decades.- Hide quoted text -
- Show quoted text -
That's neat, are you making a 'few' bit DAC?

The first idea:
The comparators are a few bit ADC and the resistors to make the
waveform are
a few bit DAC.

The second idea:
The idea is that a PWM signal at perhaps a few MHz can be made. This
PWM
signal would be nonlinear with the triangle's voltage and thus make it
into a more rounded shape.

George H.



<http://www.tinaja.com/glib/hackar4.pdf> (page 85.2)

<http://www.tinaja.com/magsn01.asp>

--
Many thanks,

Don Lancaster voice phone: (928)428-4073
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml email: don_at_tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com

Phil Hobbs
Guest

Wed Mar 10, 2010 1:39 am   



On 3/9/2010 7:15 PM, whit3rd wrote:
Quote:
On Mar 8, 6:40 pm, Phil Hobbs<pcdhSpamMeSensel...@electrooptical.net
wrote:

You can do a pretty good job with an LM13700 producing the tanh shape,
and then subtracting off a small amount of the original triangle wave to
get rid of the cusps at the peaks.

The transfer characteristics of a BIPOLAR diff pair IS a TANH
function.

See http://electrooptical.net/www/sed/TanhSineShaper.pdf

Whoa! That's brilliant, you should get a patent. Not just for what
it
is, but it REMOVES THE AUTOCORRELATION glitch.
It follows, from the Wiener-Hopf theorem, that the crude XR2206 style
diode shaping will now be VERY effective; if your triangle
wave is accurate enough, and your summation really takes
out the cusp, then the crude diode-array trim can get you
much further, to -80 dB or better.

The low level of high harmonic content in F-space looks nice, but it
doesn't do justice to the full glory of the scheme, in the context of
building a sinewave generator on a chip. Tanh and diodes are
easy, so are triangles. Getting the coefficients accurate enough
on the summation might want trimmed resistors, but that can
be done on-chip, too.


Thanks, but I very much doubt that I'm the first one to think of it.
Works great though.

Cheers

Phil Hobbs


--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net

whit3rd
Guest

Wed Mar 10, 2010 1:59 am   



On Mar 9, 7:39 am, Jim Thompson <To-Email-Use-The-Envelope-I...@My-Web-
Site.com> wrote:
Quote:
On Tue, 09 Mar 2010 10:10:26 -0500, Phil Hobbs

Yep.  "Piecewise-Linear", aka break-point analysis... taught in better
engineering schools ;-)

I would never use _just_ diodes, rather use them with OpAmps or
comparators, such as...

Oh, they work dandy with just diodes, especially with +/-24V power.
I learned
on NIM bin power (highly regulated +/- 24V, highly regulated +/- 12V)
and you can get away with a lot of things that newbies using 3.3V
aren't
gonna like. Nor IC designers, apparently.

For current sources, we just hung a resistor from +24 to a PNP
emitter, and
wired the base to +12. The only thing more convenient would be (and
it
HAS been done) +/- 200V supplies. With those, you omit the
transistor.

More volts means less bother.
It's a great relief; when something has to work on a single +2V
supply,
my blood pressure rises and I snarl at my squirrels.

whit3rd
Guest

Wed Mar 10, 2010 2:15 am   



On Mar 8, 6:40 pm, Phil Hobbs <pcdhSpamMeSensel...@electrooptical.net>
wrote:

Quote:
You can do a pretty good job with an LM13700 producing the tanh shape,
and then subtracting off a small amount of the original triangle wave to
get rid of the cusps at the peaks.

The transfer characteristics of a BIPOLAR diff pair IS a TANH
function.

See http://electrooptical.net/www/sed/TanhSineShaper.pdf

Whoa! That's brilliant, you should get a patent. Not just for what
it
is, but it REMOVES THE AUTOCORRELATION glitch.
It follows, from the Wiener-Hopf theorem, that the crude XR2206 style
diode shaping will now be VERY effective; if your triangle
wave is accurate enough, and your summation really takes
out the cusp, then the crude diode-array trim can get you
much further, to -80 dB or better.

The low level of high harmonic content in F-space looks nice, but it
doesn't do justice to the full glory of the scheme, in the context of
building a sinewave generator on a chip. Tanh and diodes are
easy, so are triangles. Getting the coefficients accurate enough
on the summation might want trimmed resistors, but that can
be done on-chip, too.

Bitrex
Guest

Wed Mar 10, 2010 5:36 am   



Jim Thompson wrote:
Quote:
On Tue, 09 Mar 2010 10:10:26 -0500, Phil Hobbs
pcdhSpamMeSenseless_at_electrooptical.net> wrote:

On 3/9/2010 9:59 AM, Jim Thompson wrote:
On Mon, 08 Mar 2010 21:42:22 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Mon, 08 Mar 2010 09:25:15 -0700, Jim Thompson<To-Email-Use-The-Envelope-Icon_at_My-Web-Site.com> wrote:

On Mon, 08 Mar 2010 00:01:44 -0800, Muzaffer Kal<kal_at_dspia.com
wrote:

On Sun, 07 Mar 2010 23:11:20 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Sat, 6 Mar 2010 20:21:10 -0800, D from BC<myrealaddress_at_comic.com> wrote:

In article<4b9324ee.4432562_at_news.tpg.com.au>, rontanner_at_esterbrook.com
says...
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.
Sure enough, as does the ICL8038. Part of the question is how it is done.
The datasheet at http://www.intersil.com/data/FN/FN2864.pdf has a
pretty good schematic and explanation which shows how it's done.
Yep. "Piecewise-Linear", aka break-point analysis... taught in better
engineering schools Wink

...Jim Thompson
I first saw it in a synchro to digital converter about 1973. I had to think
hard for a while before i "got" it.
The only place I can remember using it in an actual product was for
linearizing a flat-face CRT sweep (RADAR)... and there it was
piecewise _curve_ fitting.

...Jim Thompson
Breakpoint amps are nearly always a crutch. One poor guy I tried to
help (15 years back) ignored my advice and wound up with a multi-diode
breakpoint amp stuck inside a crystal oven to keep the breakpoints from
going all over the place with temperature. Blech. (It was in a fancy
measurement system, too. Got all sorts of industry awards.)

The Widlar approach (National AN4, Figure Cool uses BJT saturation to make
nice sharp breakpoints that don't drift much. Of course you have to
wait for the transistor to come out of saturation.

About the only good use of breakpoint amps I've seen is inside
complicated FB loops, e.g. to approximately correct for the nonlinearity
of VCOs and heaters. This reduces the variation of loop gain and so
makes frequency compensation easier. Drift and inaccuracy are not a big
problem in those sorts of applications.

Cheers

Phil Hobbs

Ah, yes! Thanks for the reminder! I also linearized a frequency
hopping VCO for OmniSpectra _many_ years ago... for jumping close to
desired frequency, so the PLL lock was faster... a cavity beast :-)

I would never use _just_ diodes, rather use them with OpAmps or
comparators, such as...

http://analog-innovations.com/SED/ClampForLarkin.pdf

(A Christmas gift, 2007. But he remains a cranky old git :-)

http://analog-innovations.com/SED/LevelDetectAndFollow-LM339.pdf

http://analog-innovations.com/SED/LevelDetectAndFollow-TL431.pdf

http://analog-innovations.com/SED/PerfectDiodeForChargerIsolation.pdf

...Jim Thompson

The first schematic looks like the start of a decent guitar fuzzbox
pedal! I think one could set more breakpoints with different slopes by
using more comparators with the breakpoint voltage on the non inverting
inputs and putting resistors in series with the diodes, right?

Back before guitar practice amps with DSP became commodity hardware,
Peavey had a patented technology called "TransTube" that purported to
make a solid state amp have a tone more like a tube amp. I wonder if
they used a similar piecewise linear technique to make the amp have a
softer clipping characteristic.

JosephKK
Guest

Wed Mar 10, 2010 6:38 am   



On Tue, 9 Mar 2010 06:35:44 -0800 (PST), MooseFET <kensmith_at_rahul.net> wrote:

Quote:
On Mar 9, 12:22 am, Fred Bartoli <myname_with_a_dot_inbetw...@free.fr
wrote:
MooseFET a écrit :



On Mar 8, 8:28 am, "Tim Williams" <tmoran...@charter.net> wrote:
"MooseFET" <kensm...@rahul.net> wrote in message

news:c968f0a3-64bc-46e1-8a14-7b36a8e75d0f_at_b9g2000pri.googlegroups.com....

If you use a quad comparator, you can do some interesting stuff.  With
just 2 more comparators, you can make this:
   ------            ------
---      ---      ---      ---
            ------
I recollect something from Don Lancaster about Magic Sinewaves and how you
can get arbitrarily low harmonics from certain optimal patterns of on and
off, given sufficiently accurate timing, and I suppose some sort of
filtering.  I never did figure out if it's supposed to be a tristate
waveform (as above)

The waveform I drew can be made by simply adding two pulse trains
with
different duty cycles.  The fact that 3 time 60 degrees is 180 degrees
is how you can get the 3rd harmonic to go away.

If you use more steps, you can get the first N harmonics to drop to
zero.  The same is true for line segments instead of steps.

Which is nothing more than the analog variant of a transversal filter
that you can build from a divider, a shift register and a few weighted
summing resistors.

It is the same idea but in this case, it is made from a triangle wave
which we have to start with instead of needing to make a higher
frequency
first.



--
Thanks,
Fred.

Just to be off the wall, what is the integral of a triangle wave?
How about the second and third integrals?

Goto page Previous  1, 2, 3, 4, 5, 6  Next

elektroda.net NewsGroups Forum Index - Electronics Design - Square + triangle = sine (almost)

Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
RTV map EDAboard.com map News map EDAboard.eu map EDAboard.de map EDAboard.co.uk map Opony