UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > General Vintage Technology > Components and Circuits

Notices

Components and Circuits For discussions about component types, alternatives and availability, circuit configurations and modifications etc. Discussions here should be of a general nature and not about specific sets.

Closed Thread
 
Thread Tools
Old 28th Dec 2017, 4:20 pm   #1
Al (astral highway)
Dekatron
 
Al (astral highway)'s Avatar
 
Join Date: Nov 2006
Location: London, UK.
Posts: 3,496
Default Integrals of waveforms?

Can anyone please signpost me to integral calcs for common waveforms?
Sine wave and square wave would be great to start with.

It’s to work out eg instantaneous current in fast (tend to low hundreds of nS) switching, so high dI/dT, esp with the added complication of low duty cycle ,where RMS current is pretty meaningless .

Just to let you know I’m planting this today but I’ve got some family events to attend to, so if I’m not responsive until tomorrow, it’s not that I’m ignoring the thread.

Thank you and i’ll be in touch soon!
__________________
Al
Al (astral highway) is offline  
Old 28th Dec 2017, 5:38 pm   #2
cmjones01
Nonode
 
Join Date: Oct 2008
Location: Warsaw, Poland and Cambridge, UK
Posts: 2,681
Default Re: Integrals of waveforms?

The integral of a sine wave is a (negative) cosine wave. The integral of a square wave is a triangle wave.

For what you're talking about, a simulator like LTSpice might be a good idea.

Chris
__________________
What's going on in the workshop? http://martin-jones.com/
cmjones01 is offline  
Old 28th Dec 2017, 7:11 pm   #3
julie_m
Dekatron
 
Join Date: May 2008
Location: Derby, UK.
Posts: 7,735
Default Re: Integrals of waveforms?

Well, integral sin x dx = -cos x + C and integral cos x dx = sin x + C. As for square waves, you can treat them as simply being y = a for some values of x and y = b for other values of x.

You can do a reasonable numerical approximation of integrating a time-varying function just by using a suitably small value for δt, and adding y * δt to a running total over the time range in question.
__________________
If I have seen further than others, it is because I was standing on a pile of failed experiments.
julie_m is offline  
Old 28th Dec 2017, 8:32 pm   #4
Al (astral highway)
Dekatron
 
Al (astral highway)'s Avatar
 
Join Date: Nov 2006
Location: London, UK.
Posts: 3,496
Default Re: Integrals of waveforms?

Thanks folks, that’s a great start!

I’d actually like to do the maths rather than use a simulator. Partly this is because I want to choose which portion of time to go down to ... for example to illuminate what’s happening when a non-linear change happens , eg when a square wave goes vertical, etc..
__________________
Al
Al (astral highway) is offline  
Old 28th Dec 2017, 8:34 pm   #5
Radio Wrangler
Moderator
 
Radio Wrangler's Avatar
 
Join Date: Mar 2012
Location: Fife, Scotland, UK.
Posts: 22,902
Default Re: Integrals of waveforms?

Sounds like you might want the differential function rater than the integral.

David
__________________
Can't afford the volcanic island yet, but the plans for my monorail and the goons' uniforms are done
Radio Wrangler is online now  
Old 28th Dec 2017, 8:40 pm   #6
MrBungle
Dekatron
 
MrBungle's Avatar
 
Join Date: Jun 2016
Location: London, UK.
Posts: 3,687
Default Re: Integrals of waveforms?

Yes. Edge detector / differentiator. Integration is unstable over time due to leakage etc as well so you end up with a situation where the mathematical integration has quite horrible constraints:

1. Leakage - integration is imperfect due to components, offsets etc.
2. Compliance. Say the high time is longer than the low time, then the integration result will rise to higher than Vcc.
3. Needs to be reset. To fix the above problems and return to "ground zero" you have to reset integrators. This makes things a lot more complicated.
4. Lag/stray capacitance. Fast integration is difficult.
5. Averaging. What's the numeric integral of a perfect sine over one cycle? 0.

Sample square + differentiator:

Click image for larger version

Name:	Screen Shot 2017-12-28 at 19.39.12.jpg
Views:	79
Size:	38.3 KB
ID:	154575

(conveniently have one on the breadboard at the moment)

Best bet is to skip integration and either count stuff or differentiate and then count/measure time if you can apply it to the problem. If you can measure the peak and the time between the leading and trailing edges, then you can derive what happens between.

Mathematics rarely matches the real world precisely, and perhaps unfortunately.

Last edited by MrBungle; 28th Dec 2017 at 8:48 pm.
MrBungle is offline  
Old 28th Dec 2017, 10:25 pm   #7
julie_m
Dekatron
 
Join Date: May 2008
Location: Derby, UK.
Posts: 7,735
Default Re: Integrals of waveforms?

The numerical approximation for differentiation is to pretend that the curve is a straight line from (x, y) to (x + δx, y + δy) and then say dy/dx = δy / δx.

You can write a program in your favourite language to produce lines of output of the form
Code:
0,0
0.001,0.2
0.002,0.6
with one pair of x and y values separated by a comma on each line. This can be
written to a file with the extension ".csv" and loaded into LibreOffice or Microsoft Excel and plotted as a graph.
__________________
If I have seen further than others, it is because I was standing on a pile of failed experiments.
julie_m is offline  
Old 29th Dec 2017, 3:30 pm   #8
G0HZU_JMR
Dekatron
 
Join Date: Sep 2010
Location: Cheltenham, Gloucestershire, UK.
Posts: 3,077
Default Re: Integrals of waveforms?

Maybe try playing with GNU Octave for stuff like this? It's free to download and is a bit like Matlab.

There is a command line interface and a GUI/graphical interface for Octave. Also it runs on Windows or Linux or MAC etc

https://www.gnu.org/software/octave/download.html

The manual is here
https://www.gnu.org/software/octave/octave.pdf

It's worth going on youtube to download a few tutorials to see how easy it is to generate or load waveforms and then do stuff with the data. Plotting graphs is also easy with Octave.
__________________
Regards, Jeremy G0HZU
G0HZU_JMR is offline  
Old 29th Dec 2017, 10:19 pm   #9
Ed_Dinning
Dekatron
 
Join Date: Jan 2004
Location: Newcastle upon Tyne, Tyne & Wear, UK.
Posts: 8,195
Default Re: Integrals of waveforms?

Hi Al, glad to see you are not yet trying to lift that transformer and sticking with brain ache not bodily strains.
Try the local ref library US Dept of Commerce, "Handbook or Mathematical Functions".

There will also be some listing of both integrals and differentials of various function in Langford Smith, Radio Designers handbook and similar tomes.

Best wishes for the new year,
Ed
Ed_Dinning is offline  
Old 29th Dec 2017, 11:03 pm   #10
Al (astral highway)
Dekatron
 
Al (astral highway)'s Avatar
 
Join Date: Nov 2006
Location: London, UK.
Posts: 3,496
Default Re: Integrals of waveforms?

Quote:
Originally Posted by Ed_Dinning View Post
Hi Al, glad to see you are not yet trying to lift that transformer and sticking with brain ache not bodily strains.
Spot on, Ed! That's exactly what's happening! I'm curious about situations where eg there isn't a pure waveform, but it's rounded off or complex. But the clean waveforms will be a great start. I'll look up the Langford Smith; may even try to acquire a copy



I hope you have a restful and Happy New Year, too.

I'll be in touch soon. Cheers for now!
__________________
Al
Al (astral highway) is offline  
Old 29th Dec 2017, 11:09 pm   #11
Synchrodyne
Nonode
 
Join Date: Jan 2009
Location: Papamoa Beach, Bay of Plenty, New Zealand
Posts: 2,944
Default Re: Integrals of waveforms?

This book (from the mid-1970s) might also be useful if it can be found:

Click image for larger version

Name:	Instant Mathematical Data Sheets Part 1 fc.jpg
Views:	49
Size:	29.1 KB
ID:	154658 Click image for larger version

Name:	Instant Mathematical Data Sheets Part 1 fci.jpg
Views:	54
Size:	57.1 KB
ID:	154659

Integration - methodology as well as formulae - accounts for about two thirds of the content.


Happy New Year!
Synchrodyne is offline  
Old 30th Dec 2017, 1:30 am   #12
Al (astral highway)
Dekatron
 
Al (astral highway)'s Avatar
 
Join Date: Nov 2006
Location: London, UK.
Posts: 3,496
Default Re: Integrals of waveforms?

Quote:
Originally Posted by Synchrodyne View Post
Integration - methodology as well as formulae - accounts for about two thirds of the content.
Thank you, I'll go looking for that; it sounds great.

Quote:
Happy New Year!
And to you, too!
__________________
Al
Al (astral highway) is offline  
Old 30th Dec 2017, 1:31 am   #13
Al (astral highway)
Dekatron
 
Al (astral highway)'s Avatar
 
Join Date: Nov 2006
Location: London, UK.
Posts: 3,496
Default Re: Integrals of waveforms?

Quote:
Originally Posted by julie_m View Post

You can write a program in your favourite language to produce lines of output of the form[code]0,0...
0.001,0.2

Hey Julie, that's really interesting! Thank you
__________________
Al
Al (astral highway) is offline  
Old 30th Dec 2017, 2:21 am   #14
Argus25
No Longer a Member
 
Join Date: Oct 2016
Location: Maroochydore, Queensland, Australia.
Posts: 2,679
Default Re: Integrals of waveforms?

Hi Al,

One of the main reasons you might to want to integrate some shaped waveform is to calculate its rms value.

I have attached ( a blue table ) of some rms values of common waves.

A while back I was interested to find out how much energy loss there was in a spark plug with a 250k fouling resistance prior to a plug firing at 10kV (image attached). The shape of the rise is a sawtooth. So it required integration to add up the squares of the voltage over time and then a square root. I have attached the page and it shows that my calculations suggested that the general formula for this shaped wave was an rms value of 0.5777Vpeak , later I found from that blue table that the exact value was 0.5774Vpeak.

So it is useful to be able to integrate waves at times, especially to help with power calculations and energy loss/dissipation issues.

Finally, we all know that when it comes to differentiation of signals, noise and HF instability is a big issue. However, there is a trick where instead of differentiating you can integrate instead, or at least LPF the signal, then use a subtracting amplifier with the original signal. Circuit attached, which works to 5MHz, might interest Mr Bungle & Radio Wrangler too.
Attached Thumbnails
Click image for larger version

Name:	int1.jpg
Views:	66
Size:	138.8 KB
ID:	154685   Click image for larger version

Name:	int3.jpg
Views:	52
Size:	48.5 KB
ID:	154686   Click image for larger version

Name:	int2.jpg
Views:	44
Size:	40.0 KB
ID:	154687  
Argus25 is offline  
Old 30th Dec 2017, 4:43 am   #15
Radio Wrangler
Moderator
 
Radio Wrangler's Avatar
 
Join Date: Mar 2012
Location: Fife, Scotland, UK.
Posts: 22,902
Default Re: Integrals of waveforms?

(1-LPF) is a very useful trick. I've also used 1-(moving average) often as a DSP DC remover after an ADC when digitising a finite-frequency IF signal. It provides a quick and efficient highpass function.

The problem with integrators is they like to drift off to infinity and need a whiff of feedback to keep them sane.

David
__________________
Can't afford the volcanic island yet, but the plans for my monorail and the goons' uniforms are done
Radio Wrangler is online now  
Old 30th Dec 2017, 9:50 am   #16
kalee20
Dekatron
 
Join Date: Feb 2007
Location: Lynton, N. Devon, UK.
Posts: 7,088
Default Re: Integrals of waveforms?

Quote:
Originally Posted by Argus25 View Post
I have attached ( a blue table ) of some rms values of common waves.
This table also gives average values - many of which are wrong!

From the top, the averages are: Wrong (zero); right; wrong; right; wrong; wrong.

To give the values shown, the waveforms would all have to be full-wave rectified so that the negative portions were 'flipped' over to become positive.
kalee20 is offline  
Old 30th Dec 2017, 10:20 am   #17
Argus25
No Longer a Member
 
Join Date: Oct 2016
Location: Maroochydore, Queensland, Australia.
Posts: 2,679
Default Re: Integrals of waveforms?

That's right. I should have cut those average values off the side of the table before I posted it as it was the rms values I was referring to and the issue of integration.

The averages only look wrong because in isolation the table is out of context, it was trying to indicate what the averages of the waveforms would show on a meter if they were full wave rectified first, the article was in fact about making meters !
Argus25 is offline  
Old 30th Dec 2017, 1:17 pm   #18
kalee20
Dekatron
 
Join Date: Feb 2007
Location: Lynton, N. Devon, UK.
Posts: 7,088
Default Re: Integrals of waveforms?

Ah! So just confusion caused by quoting out of context. Yes, in a meter circuit, preceded by FW rectifier, it'd make perfect sense.

Referring to Astral's post, like Radio Wrangler, I tend to think it's the derivative, not the integral, of the waveforms that are needed. Integral of a current is charge, which is not often used by us folks except when determining the eventual voltage on a capacitor. Integral of a voltage is magnetic flux, only useful when designing transformers and inductors. But the derivative of a voltage waveform gives current in a capacitor (so it's useful!) and derivative of a current waveform gives voltage across an inductor (so again it's useful, to estimate the magnitude of switch-off spikes).

Can we have a bit more info? It sounds intriguing!
kalee20 is offline  
Old 30th Dec 2017, 8:07 pm   #19
Al (astral highway)
Dekatron
 
Al (astral highway)'s Avatar
 
Join Date: Nov 2006
Location: London, UK.
Posts: 3,496
Default Re: Integrals of waveforms?

Thank you Hugo, that's a really interesting experiment and immaculately catalogued, as usual! The circuit is great - I'll take a closer look at how to use it.

Hugo and David (thanks too) yes, I now note how 1-LPF is helpful...
__________________
Al
Al (astral highway) is offline  
Old 30th Dec 2017, 8:16 pm   #20
Al (astral highway)
Dekatron
 
Al (astral highway)'s Avatar
 
Join Date: Nov 2006
Location: London, UK.
Posts: 3,496
Default Re: Integrals of waveforms?

Quote:
Originally Posted by kalee20 View Post
... like Radio Wrangler, I tend to think it's the derivative, not the integral, of the waveforms that are needed. ,, But the derivative of a voltage waveform gives current in a capacitor...
...which is indeed, exactly one of the things I need. If I know
(by measurement, approximation or by differentiation), the current in a capacitor (in a tank circuit, specifically) then I know that the current in the inductor in the same tank circuit is the same magnitude and opposite sign.


Quote:
Originally Posted by kalee20 View Post
Can we have a bit more info? It sounds intriguing!
Sure, it's all part of the current project... When I'm not able to physically work on construction, I like to step back and understand things more deeply, take notes, and really immerse myself in what could go non-linear (ie, catastrophic) on me when I up the ante in terms of power.

You might recall that you sent me those amorphous alloy toroids (grey and green) a couple of years ago now, maybe longer - along with some notes you prepared and tech data? Between ops I've been gradually immersing myself in making and testing my own magnetics. This is proving really handy as I can now make a pretty decent gate transformer, and more recently, have built my own current transformers when to buy a commercial one of the same spec would cost silly money!

Here (yellow trace) is a snapshot of current in a (similar to mine) big inductor at resonance, via a current transformer. I'm including it to show how variably variable the current is within a short switching period. This is one of the intriguing properties of such a circuit... attack and decay lengths moving around all the time, and the amplitude of current, too. Hence RMS values are pretty hopeless here.

Someone might say, well, if you have the means to look at current waveforms on a 'scope, why bother with differentiation? And I'd say, why not? ;-)
Attached Thumbnails
Click image for larger version

Name:	current sec.jpg
Views:	42
Size:	63.4 KB
ID:	154738  
__________________
Al

Last edited by Al (astral highway); 30th Dec 2017 at 8:29 pm.
Al (astral highway) is offline  
Closed Thread




All times are GMT +1. The time now is 2:22 am.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.