Square + triangle = sine (almost)

ok.com

e wave

it

sine

it is done.

.

etter

=A0 =A0 =A0 ...Jim Thompson

d to think

=A0 =A0 =A0 =A0...Jim Thompson

m

ancy

ke

ty

big

=A0 =A0 ...Jim Thompson

At lowish frequencies, you can do this:

---------------------------------------/\/\---+----Out ! ! +-----------------/\/\----+-/\/\---+---/\/\----+ ! ! ! ! ! --!-\ ! ! In ---+--------!+\ ! >-- ! ! >---+--/\/\--+---!+/ ! --!-/ ! ! ! ! ! ---/\/\--GND ! GND--/\/\--+--/\/\---+------------------------/\/\--

With rail to rail op-amps, you can get a total of 6 knees from Vee to Vcc in the output swing.

Reply to
MooseFET
Loading thread data ...

ote:

=A0With

how you

on and

ate

rees

Each time you integrate, the segment between switching points becomes a higher power of X.

Square wave X^0 Triangle wave X^1 ?????? wave X^2 Cubic wave X^3

Reply to
MooseFET

A little over a decade ago, I worked along with 2 partners on what we hoped would be a patentable significant on an "electric guitar fuzzbox". As in able to get a patent for improvement over prior art in US patents by Pittman and Scholz (sp).

"Our" device received rave reviews where we showed it off.

"We" abandoned the project after determining that "we" could make a majority as much money working at entry level at a big-name fast-food restaurant as "we" could getting this device manufactured and selling it, even should (unlikely) sales volume get the cost of patenting it to be negligible-per-unit, let alone battling whoever tries their hand at infringing "our patent" in a case likely costing upper 10's of kilobucks to hundreds of kilobucks (I can't rule out megabucks) in a court battle.

One of "us" (we 3) even schmoozed the likely examiner of the prospective patent application to extent of hearing from the likely examiner that a patent would likely be granted.

This "improved fuzzbox" never went to any actually filed patent application. It was since published on the web, at least significantly where web searching for it or major segments of it are best found by AND-ing search terms of "LXH2" and either of the 2 major brands of British electric guitar amplifiers - Fender or Marshall.

- Don Klipstein ( snipped-for-privacy@misty.com)

Reply to
Don Klipstein

Yup! Good 'ole analog DFGs..

Reply to
Robert Baer

Integral of a triangle wave is a "nearly-sinusoid" having periodic parabolic arches.

This reminds me of a story...

During my 2nd (and successful) attempt to pass "Electronic Instrumentation Laboratory" course at Drexel U. around 1983-1984 or so, I had to handle the 10th of 10 weekly "laboratory projects".

That was an "analog computer" that modelled a damped resonant item such as a "damped pendulum". This used a circuit having two op-amp integrators with arrangement so as to model K1 * y'' + K2 * y' plus K3 * y = zero.

I was one of only 2 out of 78-or-so students taking that course that semester who managed to make this thing work. (Not that I did so well or better most of elsewhere in my attempt for an EE degree...)

I got the circuit to work by recognizing a "parabola arch wave" on an oscilloscope to be visibly discernable from a sinusoid, and subsequently setting "initial conditions" short of any of the op-amps clipping. (The parabolic arch waveform was due to a heavily clipped sinusoid being integrated twice.) Fixing the clipping issue achieved the oscillation damping-out rather than growing.

- Don Klipstein (Jr) snipped-for-privacy@misty.com

Reply to
Don Klipstein

done.

think

I'm having trouble following that circuit - it looks clever, but how does it work?

Reply to
Bitrex

Avoid this chip like the plague. At the transiition from one quadrant to the next there is one almighty noise spike.

Reply to
Somebody

This is indeed a very cute circuit, in fact I had built something similar, but with one more opamp.

ciao Ban

Reply to
Ban

Gradually becomes sine, though smaller and smaller amplitude. I've used such a scheme over small frequency ranges... in an ASIC, of course, where parts are cheap :-) ...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
Reply to
Jim Thompson

done.

think

Yep, It's the sort of circuit arrangement where you can continue pretty much forever :-)

Possibly. ...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
Reply to
Jim Thompson

"Phil Hobbs" wrote in message news: snipped-for-privacy@electrooptical.net...

Very similar to the Gilbert sine shaper. It uses the fact that the tanh function's maclauren series is similar to the sin maclauren series

sin x = x - x^3/3! + x^5/5! - ... tanh x = x - x^3/3 + 2x^5/15 - 17x^7/315...

so by summing the result of tanh x + tanh x/a - tanh -x/a you end up with a result that is closer to the sin, assuming you only use the values generated by the range -PI/2 to PI/2.

Here is an LTSpice simulation that implements it. No idea how well it works over temp ranges etc.

Regards, Bob Monsen

Version 4 SHEET 1 1320 680 WIRE -384 -224 -576 -224 WIRE 176 -224 -384 -224 WIRE 320 -224 176 -224 WIRE 832 -224 320 -224 WIRE -384 -208 -384 -224 WIRE 176 -208 176 -224 WIRE 320 -208 320 -224 WIRE 832 -208 832 -224 WIRE -384 -112 -384 -128 WIRE 176 -112 176 -128 WIRE 320 -112 320 -128 WIRE 832 -112 832 -128 WIRE 112 -64 -320 -64 WIRE 768 -64 384 -64 WIRE -576 -48 -576 -224 WIRE 112 -16 112 -64 WIRE 176 -16 112 -16 WIRE 384 -16 384 -64 WIRE 384 -16 320 -16 WIRE 176 16 176 -16 WIRE 176 16 -16 16 WIRE 688 16 176 16 WIRE -384 32 -384 -16 WIRE 832 32 832 -16 WIRE 320 48 320 -16 WIRE 320 48 -160 48 WIRE 544 48 320 48 WIRE -160 80 -160 48 WIRE -16 80 -16 16 WIRE 176 80 176 16 WIRE 320 80 320 48 WIRE 544 80 544 48 WIRE 688 80 688 16 WIRE -224 128 -272 128 WIRE 64 128 48 128 WIRE 400 128 384 128 WIRE 480 128 464 128 WIRE 768 128 752 128 WIRE -576 160 -576 32 WIRE -272 160 -272 128 WIRE 464 160 464 128 WIRE -80 176 -160 176 WIRE -16 176 -80 176 WIRE 240 176 176 176 WIRE 320 176 240 176 WIRE 624 176 544 176 WIRE 688 176 624 176 WIRE 944 176 944 16 WIRE -576 192 -576 160 WIRE -528 192 -576 192 WIRE -320 192 -448 192 WIRE 64 192 64 128 WIRE 64 192 -320 192 WIRE 400 192 400 128 WIRE 400 192 64 192 WIRE 768 192 768 128 WIRE 768 192 400 192 WIRE -384 208 -384 32 WIRE -80 208 -80 176 WIRE 240 208 240 176 WIRE 624 208 624 176 WIRE 832 208 832 32 WIRE -576 224 -576 192 WIRE -272 256 -272 240 WIRE 464 256 464 240 WIRE -576 320 -576 304 WIRE -384 320 -384 288 WIRE -384 320 -576 320 WIRE -80 320 -80 288 WIRE -80 320 -384 320 WIRE 240 320 240 288 WIRE 240 320 -80 320 WIRE 624 320 624 288 WIRE 624 320 240 320 WIRE 832 320 832 288 WIRE 832 320 624 320 WIRE 944 320 944 256 WIRE 944 320 832 320 FLAG 112 128 0 FLAG -576 160 0 FLAG -320 192 c FLAG -384 32 a FLAG 832 32 b FLAG 944 16 out FLAG -272 256 0 FLAG 464 256 0 SYMBOL npn 384 80 M0 SYMATTR InstName Q3 SYMBOL npn 112 80 R0 SYMATTR InstName Q4 SYMBOL current 240 208 R0 SYMATTR InstName I2 SYMATTR Value 50µ SYMBOL voltage -576 208 R0 SYMATTR InstName V1 SYMATTR Value 5 SYMBOL voltage -576 -64 R0 SYMATTR InstName V2 SYMATTR Value 5 SYMBOL voltage -432 192 R90 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 WINDOW 3 24 104 Invisible 0 SYMATTR InstName Vtri SYMATTR Value PULSE({-Va} {Va} 0 .5 .5 0 1) SYMBOL npn 480 80 R0 SYMATTR InstName Q1 SYMBOL npn 752 80 M0 SYMATTR InstName Q2 SYMBOL current 624 208 R0 SYMATTR InstName I1 SYMATTR Value 50µ SYMBOL npn -224 80 R0 SYMATTR InstName Q5 SYMBOL npn 48 80 M0 SYMATTR InstName Q6 SYMBOL current -80 208 R0 SYMATTR InstName I3 SYMATTR Value 50µ SYMBOL pnp 112 -16 M180 SYMATTR InstName Q7 SYMBOL pnp -320 -16 R180 SYMATTR InstName Q8 SYMBOL res 160 -224 R0 SYMATTR InstName R1 SYMATTR Value 10 SYMBOL res -400 -224 R0 SYMATTR InstName R2 SYMATTR Value 10 SYMBOL pnp 384 -16 R180 SYMATTR InstName Q9 SYMBOL pnp 768 -16 M180 SYMATTR InstName Q10 SYMBOL res 336 -224 M0 SYMATTR InstName R3 SYMATTR Value 10 SYMBOL res 848 -224 M0 SYMATTR InstName R4 SYMATTR Value 10 SYMBOL res 816 192 R0 SYMATTR InstName R5 SYMATTR Value 100k SYMBOL res -400 192 R0 SYMATTR InstName R6 SYMATTR Value 100k SYMBOL bv 944 160 R0 SYMATTR InstName B1 SYMATTR Value V={5+V(a)-V(b)} SYMBOL voltage -272 144 R0 SYMATTR InstName V3 SYMATTR Value {E} SYMBOL voltage 464 144 R0 SYMATTR InstName V4 SYMATTR Value {-E} TEXT 72 384 Left 0 !.tran 0 100 0 500u TEXT -432 352 Left 0 ;Barrie Gilbert's Sine Shaper TEXT 960 48 Left 0 !.four 1 v(out) 10 TEXT 440 376 Left 0 !.param E=100m TEXT 232 376 Left 0 !.param Va 50m TEXT -528 392 Left 0 ;I1 - I2 = I * 2 * exp(-Vt*PI*PI/2/E)*sin(PI*Va/(N-1)/E)\nN = number of pairs, Va amplitude of triangle, E amplitude of correction. TEXT -376 0 Left 0 ;I1 TEXT 840 -8 Left 0 ;I2

Reply to
Bob Monsen

Dude, the chip was new maybe 40 years ago and quite obsolete. Is=20 someone wildcatting poor work alikes out there?

Reply to
JosephKK

=A0With

and how you

of on and

of

tristate

degrees

to

filter

weighted

That is what integrating the Fourier series term by term tells us.

Reply to
JosephKK

To close the loop and make an oscillator, using a square wave from a Schmitt trigger, one can use one stage of integration (to a triangle wave) or three, but not two. Two stages gets to a double-parabola, three stages to a double-cubic. The double-cubic has its small pointy defect at the crest as does the triangle wave.

The three-stage thing is called a phase shift oscillator if you make it without the Schmitt trigger part.

Alas, those all require multiple-gang variable resistors instead of a single knob to adjust. Have you ever priced a good three-gang pot? Or capacitor, for that matter?

Reply to
whit3rd

Or quite simply, when you stack up n integrators, you get 20*n dB/decade attenuation for frequencies away from fT. For convinience, set your integrators' fTs to the fundamental.

I suppose you could do the same with differentiators if you had a lot of LF noise on your signal too (or wanted to bandpass to a harmonic).

Of course, n differentiators and integrators, with the same fT (actually, with any fT, as long as the total has the desired gain at the peak), is an excellent description of a particularly narrow bandpass filter. As n --> infty, you get a delta response, so the circuit's impulse response is a sinewave, regardless of past or present state. It's an oscillator!

Tim

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

rook.com

al

are wave

t it

d sine

w it is done.

ne.

better

=A0 =A0 =A0 =A0 ...Jim Thompson

had to think

=A0 =A0 =A0 =A0...Jim Thompson

to

de

rom

fancy

make

to

rity

so

a big

=A0 =A0 =A0 ...Jim Thompson

by

g
f

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0!

=A0 =A0 =A0! =A0 =A0 =A0 =A0 =A0 !

-\ =A0 ! =A0 =A0 =A0 =A0 =A0 !

=A0 =A0 =A0 =A0!

=A0 =A0 =A0 =A0 !

=A0 =A0 =A0 =A0 =A0 =A0 =A0 !

-GND =A0 =A0 =A0 =A0 !

Start with Vin =3D 0 Both op-amps are working normally. A small change in Vin is given gain as it goes towards output

Increase Vin and at some point the 2nd op-amp hits the rail. Now the gain is less.

Increase Vin and the 1st opamp hits the rail. Now the gain is even lower.

Increase Vin and the (-) input of the 2nd opamp is going up to where the 2nd opamp comes off the rail and swings downwards The gain is further reduced.

The same works in the other direction.

Reply to
MooseFET

On Mar 10, 1:47=A0pm, whit3rd wrote:

You can use just one pot with the wiper grounded to make two stages where the gain varies proportionally to the pot setting.

The circuit below does this. Since a two integrator oscillator design requires two gain stages that vary proportional to the frequency desired, this will do the trick over a reasonable range.

Version 4 SHEET 1 1404 680 WIRE 208 -176 32 -176 WIRE 464 -176 288 -176 WIRE 1072 -144 1008 -144 WIRE 1216 -144 1152 -144 WIRE 464 -80 464 -176 WIRE 544 -80 464 -80 WIRE 320 -48 320 -64 WIRE 1216 -48 1216 -144 WIRE 1296 -48 1216 -48 WIRE -448 -32 -688 -32 WIRE -144 -32 -448 -32 WIRE 32 -32 32 -176 WIRE 32 -32 -64 -32 WIRE 288 -32 240 -32 WIRE 464 -16 464 -80 WIRE 464 -16 352 -16 WIRE 32 0 32 -32 WIRE 288 0 32 0 WIRE -688 16 -688 -32 WIRE 1088 32 1088 16 WIRE 320 48 320 16 WIRE 464 48 464 -16 WIRE 880 48 464 48 WIRE 1008 48 1008 -144 WIRE 1008 48 960 48 WIRE 1056 48 1008 48 WIRE 32 64 32 0 WIRE 1216 64 1216 -48 WIRE 1216 64 1120 64 WIRE 1056 80 1008 80 WIRE 240 112 240 -32 WIRE 384 112 240 112 WIRE 464 112 464 48 WIRE -688 128 -688 96 WIRE 1088 128 1088 96 WIRE 32 176 32 144 WIRE 240 192 240 112 WIRE 240 304 240 272 WIRE -448 352 -448 -32 WIRE 1008 352 1008 80 WIRE 1008 352 -448 352 WIRE -32 432 -32 416 WIRE 96 432 96 416 WIRE -32 528 -32 512 WIRE 96 528 96 512 FLAG 320 -64 vcc FLAG -32 416 vcc FLAG 320 48 vee FLAG 96 416 vee FLAG 96 528 0 FLAG -32 528 0 FLAG -688 128 0 FLAG 32 176 0 FLAG 240 304 0 FLAG 1088 16 vcc FLAG 1088 128 vee FLAG 544 -80 ver1out FLAG 1296 -48 ver2out SYMBOL voltage 96 416 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value -12 SYMBOL voltage -32 416 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V2 SYMATTR Value 12 SYMBOL voltage -688 0 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V3 SYMATTR Value 1 SYMBOL res -48 -48 R90 WINDOW 0 0 56 VBottom 0 WINDOW 3 32 56 VTop 0 SYMATTR InstName R1 SYMATTR Value 10k SYMBOL res 48 160 R180 WINDOW 0 36 76 Left 0 WINDOW 3 36 40 Left 0 SYMATTR InstName R2 SYMATTR Value {10E3*PotSetting} SYMBOL res 192 -160 R270 WINDOW 0 32 56 VTop 0 WINDOW 3 0 56 VBottom 0 SYMATTR InstName R3 SYMATTR Value 10k SYMBOL res 224 176 R0 SYMATTR InstName R4 SYMATTR Value 10k SYMBOL res 480 96 R90 WINDOW 0 0 56 VBottom 0 WINDOW 3 32 56 VTop 0 SYMATTR InstName R5 SYMATTR Value 10k SYMBOL Opamps\\LT1056 320 -80 R0 SYMATTR InstName U1 SYMBOL Opamps\\LT1056 1088 0 R0 SYMATTR InstName U2 SYMBOL res 1056 -128 R270 WINDOW 0 32 56 VTop 0 WINDOW 3 0 56 VBottom 0 SYMATTR InstName R6 SYMATTR Value 10k SYMBOL res 864 64 R270 WINDOW 0 32 56 VTop 0 WINDOW 3 0 56 VBottom 0 SYMATTR InstName R7 SYMATTR Value 10k TEXT -392 -176 Left 0 !.step param PotSetting=3D0.001 1 0.2 TEXT -392 552 Left 0 !.op

Reply to
MooseFET

snipped-for-privacy@esterbrook.com

Allis>>>>>>>>>>>>>> "Harold Larsen"

wave

done.

think

Plessey used to sell packaged RF amps that worked a bit like that--they were meant to be cascaded to form logarithmic IF strips. They had a gain of 10 dB for small signals, dropping to 0 dB when they saturated. With a string of them in series, upping the signal input by 10 dB railed another amplifier, and so reduced the overall gain by 10 dB.

That way, the differential gain was dVout/dVin ~ 1/Vin, which makes it approximately logarithmic. These were different from the usual successive-detection DLVAs, because they actually performed logarithmic compression on the RF, not just the detected signal.

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
Reply to
Phil Hobbs

On Mar 10, 7:32=A0pm, Phil Hobbs wrote: [....]

-Out

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0!

=A0 =A0 =A0 =A0! =A0 =A0 =A0 =A0 =A0 !

--!-\ =A0 ! =A0 =A0 =A0 =A0 =A0 !

=A0 =A0 =A0 =A0!

=A0 =A0 =A0 =A0 =A0 !

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 !

/\--GND =A0 =A0 =A0 =A0 !

[....]

I have often thought that the same sort of thing would be good in an FM IF strip. In that case, the 3rd power part of the series is what does the most to remove the noise. The odd numbered terms are less effective. As a result, it would be very nice to be able to make the limiting stage have the right amount of 3rd power and less of all the others.

Reply to
MooseFET

If you use an FM detector that's insensitive to AM, e.g. a wideband PLL, it'll work better than a limiter at low SNR. Essentially all reasonable demodulation schemes work equivalently at high SNR, where the AM and PM fluctuations are linear functions of the additive noise amplitude.

At low SNR, limiters start suppressing the signal in favour of the noise. That leads to dropouts--periods during which the signal disappears and only the noise is left--which really set the threshold for detection. PLLs using wideband AGC instead of limiting don't exhibit threshold, although the detected signal does get noisier as the SNR declines. (You need the AGC to keep the loop bandwidth reasonably constant.)

The Plessey scheme can be thought of as a kind of ultrawideband AGC, I suppose--as long as the compression comes after the narrowest IF filter, it should be nearly equivalent.

The only other problem there would be AM-PM conversion. Most kinds of amplifiers slow down when you rail them, which leads to phase errors. (The good news for FM is that this needs only a 1-D calibration, instead of 2-D as in I/Q schemes.)

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
Reply to
Phil Hobbs

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.