Author Topic: SOLVED: “Integrals” & “integrator”: clear … AS MUD  (Read 2224 times)

0 Members and 1 Guest are viewing this topic.

Offline etiTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 1801
  • Country: gb
  • MOD: a.k.a Unlokia, glossywhite, iamwhoiam etc
SOLVED: “Integrals” & “integrator”: clear … AS MUD
« on: November 10, 2022, 08:35:07 am »
Hi there.

Could someone possibly find me a SIMPLE, well-explained description of what an “integral” is, as is the output of an op amp in “integrator” (feedback, capacitor) configuration, please?

It’s clear that some people CAN make tutorials ridiculously easy to grasp, and if you can find the integrator/integrals equivalent of this EXCEPTIONALLY easy to grasp video (below), then maybe this maths overload fog will dissipate (the usual assumptions BS found in full, dry, unhelpful “explanations” online and on YouTube)

We ain’t all Einstein and we didn’t all take advanced Maths classes - explain from the bottom up - make no assumptions AT ALL, is what I’d advise people wanting to make their explanation notoriously well respected, as an entertaining articulation of clarity is exceptionally rare.

Please, I beg you, don’t melt my brain 😂

This is the video I’m referring to which shows it IS POSSIBLE to alter the teaching method and have things “CLICK!!!!!!” suddenly (This is nothing to do with integration, Apart from being coincidentally a video on op amp operation - I’m merely saying that simplicity IS possible!!)

Summary: if you can help, I am looking for an equally as easy to understand Explanation of what integrals are in electronic waves. Thank you so much.


Forgive me for being lazy, and yeah I kinda noticed pretty quickly that the obvious solution was in my initial post - Bob Duhamel, the very chap in the video I quoted at the beginning (underneath)



So here’s the video, and it’s GREAT. Apologies for wasting your time.

« Last Edit: November 10, 2022, 09:19:32 am by eti »
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7453
  • Country: pl
Re: “Integrals” & “integrator”: clear … AS MUD
« Reply #1 on: November 10, 2022, 08:56:54 am »
Well, the opposite of derivative, ofc.

Analog integrators are a simple matter: the output slews at a rate proportional to the current fed into the integrator. More current - faster change, opposite current - opposite direction. Nothing more to it. Well, sometimes the output hits the rail, then it stops moving. They call it saturation.

An integrator typically keeps its input at a constant voltage (ground or similar), so a common variation on the theme is feeding the integrator through a resistor R whose remote end is connected to a voltage signal. This generates input current equal Vsignal/R.

The application in opamps should be fairly obvious.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21227
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: “Integrals” & “integrator”: clear … AS MUD
« Reply #2 on: November 10, 2022, 09:00:16 am »
Could someone possibly find me a SIMPLE, well-explained description of what an “integral” is, as is the output of an op amp in “integrator” (feedback, capacitor) configuration, please?
...
We ain’t all Einstein and we didn’t all take advanced Maths classes - explain from the bottom up - make no assumptions AT ALL, is what I’d advise people wanting to make their explanation notoriously well respected, as an entertaining articulation of clarity is exceptionally rare.

Advanced? Everybody in my (state) school learned basic calculus (differentiation and integration of polynomials except 1/x) at 14-15yo.

Quote
Summary: if you can help, I am looking for an equally as easy to understand Explanation of what integrals are in electronic waves. Thank you so much.

You are expecting somebody here to spend time poorly duplicating standard maths courses and textbooks?! Good luck with that :)

At the very least you should expend your time and effort documenting what you don't understand, so that people might have a chance of correcting your misunderstandings.

I suggest you look through the threads on this forum about suitable electronics books.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #3 on: November 10, 2022, 02:21:48 pm »
It's good you have it solved.  I would have pointed you to Khan Academy

https://www.khanacademy.org/math/ap-calculus-ab/ab-integration-new/ab-6-1/v/introduction-to-integral-calculus

Simply put, the integral is the area under a curve.

Op amp integrators are important because they lead directly to analog computers and those are important in visualizing differential equations at work.  A common example is the RLC circuit.

Way over the top but here's a Wiki on RLC circuits.  Note the damped sine wave...

https://en.wikipedia.org/wiki/RLC_circuit
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 9003
  • Country: us
  • Retired, now restoring antique test equipment
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #4 on: November 10, 2022, 04:37:08 pm »
One of the great moments in Western intellectual history was the discovery of "The Fundamental Theorem of Calculus"  https://mathworld.wolfram.com/FundamentalTheoremsofCalculus.html
Independently proven by Newton and Leibnitz,based on previous work by others, this theorem shows that the derivative and integral operators were inverses of each other.
It is trivial to understand the integral as the area under a curve, and the derivative as the slope of the curve, but the relation between the two operations is not obvious, but extremely important to mathematical analysis.
 
The following users thanked this post: RJSV

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #5 on: November 10, 2022, 06:45:23 pm »
I think the theorem gets a little more concrete when you consider the analog computer solution to a second order differential equation like the Mass-Spring-Damper.

The diffeq is

m*y'' + d*y' + s*y = 0

The sum of the forces are zero.
m*y'' is mass times acceleration in the y direction
d*y' is the damping constant times the velocity in the y direction
s*y is the spring constant times the position of y.  The mass can bounce above and below y=0.

So, let's solve this thing for y(t) using the method proposed by Lord Kelvin:

Assume we have y'' (we don't but assume we do) now integrate it to get y'.
Integrate y' to get y.  We just got rid of all differentiation!

The equation we will solve is m*y'' + d*y' + s*y = 0
Move everything except y'' to the right hand side y'' = (-1/m) * (d*y' + s*y)

Now comes the magic of Lord Kelvins approach:

Assume we have y'' (we don't but we soon will)
Integrate it to get y' and integrate again to get y.  Use potentiometers/adders to scale m (usually assumed to be 1), d and s.  We have y' and y'' plus we know the constants m, d and s.

We didn't really have y'' but we do now, it is on the right hand side of the equation.  All we need is a wire from the right hand side to the y'' input.  Set an initial condition of y = -1 (we're pulling it down to the limit) on the second integrator (y from y') and you're good to go.  You can diddle mass, damping and spring rate to vary the results.

Integrators rule!

Attached is a MATLAB Simulink model and a graph of the output:
« Last Edit: November 10, 2022, 06:49:31 pm by rstofer »
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 6420
  • Country: de
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #6 on: November 10, 2022, 09:50:59 pm »
Bit off topic, but still:
At university in the late 80s, our maths professor brought a special treat to our class:
An original "calculi differentialis" by Euler from the 18th century. (to be clear: an antique book).
Wherever he had that from is anyone's guess, but we students were all completely blown away.
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 7276
  • Country: ca
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #7 on: November 10, 2022, 10:09:03 pm »
Integral is the area under a curve.

Simple as that.

Integral of a Sin or Cos wave (with no DC offset) over 1 full period is zero, because it has two equal areas with opposite polarity signs.
Facebook-free life and Rigol-free shack.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #8 on: November 11, 2022, 09:07:58 pm »
3Blue1Brown has a lengthy video series on Calculus but the first video is right on target:

https://youtu.be/WUvTyaaNkzM?list=PLZHQObOWTQDMsr9K-rj53DwVRMYO3t5Yr

17 minutes well spent...
« Last Edit: November 11, 2022, 09:10:38 pm by rstofer »
 

Online RJSV

  • Super Contributor
  • ***
  • Posts: 2760
  • Country: us
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #9 on: November 17, 2022, 05:11:16 pm »
   Best 'answer' is from TimFox, (back a few posts), alluding to the converse pair nature of derivatives and integrals.  Also, nobody has mentioned LIMITs and how the limit criteria plays out in solutions.
   Quite a nice arrangement, having a thought expertise, around a seemingly impossible conjecture...That being a question, What happens when such and such goes smaller and smaller, to 'endless' toil ?
But it works out, as some 'limits' are calculatable. If you consider, what's the limit, if you take '1' and keep dividing it by 2, (forever).  The statement / question sounds illogical, but yet not so much when look at closer, that sequence, 1/2, 1/3, 1/4,...etc. etc. WILL get to zero, in the Calculous frame of mind, and there are ways, and some shortcomings, on how to calculate some hard numbers, regardless of the 'flakey' sounding basis. 
Yeah, I know, clear as mud, but the 3 things to learn are the derivative, the calculation of limits, and integrals, being functional opposite, of derivatives.
   My math professor was a 'retired' race-car driver, knew his shit in MATH, and had some really colorful ways of directing his lectures, for sure!
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 9003
  • Country: us
  • Retired, now restoring antique test equipment
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #10 on: November 17, 2022, 06:37:41 pm »
My favorite example of a useful limit to a non-obvious question:
Consider the expression sin(x)/x.  At x=0, this becomes 0/0, which is "indeterminate".
However, in the limit as x->0, the limit of the ratio becomes 1.
You can verify this by inspection, with an old-fashioned trigonometry table (for angles in radians), or with a calculator (again, using radian angles).
Or, you can use the theorem that states that the limit of a ratio equals the ratio of the limits of the derivatives of numerator and denominator.
 

Online RJSV

  • Super Contributor
  • ***
  • Posts: 2760
  • Country: us
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #11 on: November 18, 2022, 01:40:31 pm »
   Here is an example to try; take a simple drive, in your car, and write down your speed.  Do very boring same speed and result, you can have a simple diagram, a rectangle.
That rectangle is just speed, or rate multiplied by time, giving your miles total.  Now, do a couple others, separate and simple, so you've then gotten FOUR separate and different sizes, separate little runs in car.
Add those up, (and don't get distracted by talk of area under curve...too abstract).
   Now then, see the trend,...it's to go smaller and finer, each time taking thinner 'slices' in the rectangular pieces.  Well, obtaining integrals, or integration, is the goal of smoothness, of the process outcome, in other words, if you go way down, to zero thick (pieces).
See diagram of that process of going finer on the horiz. scale.
 

Online RJSV

  • Super Contributor
  • ***
  • Posts: 2760
  • Country: us
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #12 on: November 18, 2022, 02:00:49 pm »
   The tricky process, of figuring out the first integrals, I learned that derivatives, more easily understood intuitively, sit in a heirarchy, along with integrals, where integrals are 'more complex' or higher up the ladder so to speak.
   The first integrals were easy, and math folks, (I heard, lol), math folks learned to pick things apart by going backwards, through the process, and came up with a thoerm or two.  I'm thinking the SINE COSINE periodic functions, with obvious slope of 'one' at zero cross locations, was an easy integral.
There was always a constant came out, unknown, that also needed to be solved / defined.
   So you know your area, but need to solve for 'the limit', as the pieces approach 'zero' thick, and having the function shape, vertically.  I think the approach also had to use 'trapazoid' shaped pieces, sloped top as it varies in height from point to point.  That's one false trap to avoid...each shrunken piece does not assume zero slope top, it just as sloped as bigger sized.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 9003
  • Country: us
  • Retired, now restoring antique test equipment
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #13 on: November 18, 2022, 03:25:01 pm »
Only a slight exaggeration, and why integration scares people:  https://xkcd.com/2117/
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #14 on: November 18, 2022, 03:26:04 pm »
If you want to use slices to integrate, you are headed toward Riemann Sums.  There are 3 simple sums before we get to the trapezoidal approach.  They are the left, center and right sum where the name is which corner or center of the rectangle is being used to create the slice.  The center sum is the best approximation of the three.  The trapezoidal considers the trapezoid at the top of each slice and is also a good approximation.

https://www.khanacademy.org/math/ap-calculus-ab/ab-integration-new/ab-6-2/a/left-and-right-riemann-sums

Here are the results of integrating f(x) = (x**2) + sqrt(1.0 + (2.0 * x)) between 3 and 5 using 100,000 slices:

Code: [Select]
Sums taken over   100000 slices
Left   Riemann Sum =  38.65404
Center Riemann Sum =  38.65420
Right  Riemann Sum =  38.65437

Trapezoidal Area   =  38.65420

Definite Integral  =  38.65420...

The center and trapezoidal integrals are quite close to the calculated definite integral.



« Last Edit: November 18, 2022, 05:45:49 pm by rstofer »
 

Online RJSV

  • Super Contributor
  • ***
  • Posts: 2760
  • Country: us
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #15 on: November 18, 2022, 06:01:27 pm »
   Newton used the term 'Analytical Geometry', in his work on mechanics of motion, position, velocity, acceleration.
   To show what a backwards process would be, say you have 'T 2' or T squared, and partially just by guessing, figure the derivative is '2T'.  If you just view that backwards, could say the integral is:
   Integral of '2T' is 'T squared'... and so start learning a set of strategies, to 'solve' integration equations, partially by that backwards deduction.
Newtons was distance = 'A x Tsquared', using the well known free-fall equation.
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7193
  • Country: fi
    • My home page and email address
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #16 on: November 19, 2022, 02:24:25 pm »
Others have answered the question with good references one can follow, to make differential calculus their bitch tool.
I'd like to post a wall of text with the intent of giving an useful intuitive grasp, so that when one goes off to learn the details, they just "slot in" into ones understanding nicely.
This is intended to be read through as a story, rather than the way one might read a textbook or a manual.  The idea is to get the gist, the grasp, on the thing described, not to memorize any particular details.

If you care, do let me know (either here or in a PM) whether this worked for you.  If you don't want me to post these long-ass posts, just say so here.



What if you were a doorman or security official, whose purpose was to ensure there were at most N people inside say a ballroom.  How would you go about it?
Obviously, you'd keep a tally of the number of persons entering, and the number of persons exiting, and only let people enter when (entered - exited < N).

This can actually be considered the discrete variant of integration.  With discrete values, integration turns into sums.

Let's change the problem a bit: instead of people, you need to measure the amount of water.   You could do this using a bucket for the incoming water, and a bucket for the outgoing water, and use a known volume cup to move the water from one bucket to the other, and counting the cups.  This would be the same thing as the doorman above, except that you just count the outgoing cups only.  Yet, this would be horribly inefficient and a lot of work!

Instead, you connect the incoming and outgoing pipes with a flow meter.  It is just a propeller, which rotates based on the velocity of the flow inside the pipe of the flow meter.  Because the diameter of the flow meter pipe is known, and water is basically incompressible (unlike say air), the flow meter actually tells us the volume of water flowing through it per time unit, at every instant.  While people or cups of water are discrete, the flow is now continuous.

To tell the amount of water that has flown through the flow meter during some time interval, we integrate the flow rate with respect to time, over that time interval.  (This is also called a definite integral.)

If we add a device to the flow meter, like a stop watch, but measures volume, so that using the flow rate, it integrates over time to show the total volume flown through the meter, it is an integrator.

If we call the total amount of water the "change" –– because we don't know how much water was in the output initially, we only know how much the total changes ––, then the thing we integrated is the "rate of change".  This also applies in the inverse: if we know how the "change" as a function of time (and it is continuous), then "rate of change" is the derivative of the "total" with respect to time.

Distance, velocity, acceleration, and jerk are the most commonly used examples of integrals and derivatives, though.  "Change" is distance, "rate of change" is velocity (speed), and "rate of rate of change" is acceleration.  Jerk is the "rate of rate of rate of change"; for example, when a car speeds up, it is the change in acceleration.

Integrating velocity with respect to time gives us the change in distance.  Integrating acceleration with respect to time gives us the change in velocity; and done twice, the change in distance.  Integrating jerk with respect to time gives us the change in acceleration; done twice, change in velocity; done three times, the change in distance.

A bit of math at this point.  Let's use \$d\$ for distance, \$v\$ for velocity, \$a\$ for acceleration, and \$j\$ for jerk.

If we ignore drag and Earth's rotation, an object in free fall accelerates at \$1 g_n \approx 9.8 m/s^2\$ downwards (towards the gravitational center of Earth).  (Because Earth is an oblate spheroid that rotates, the acceleration is greatest at the poles and smallest at the equator; and because Earth is not structurally uniform, the acceleration varies a little bit depending on the inner structure, like whether you're over deep sea or mountains or so.)
So, we have constant \$a = 9.8 m/s^2\$, and no jerk (\$j = 0\$) because \$a\$ is constant.

The integral of \$a\$ is \$v\$,
$$v(t) = \int a ~ d t = a t + v_0$$
and the integral of \$v\$ is \$d\$,
$$d(t) = \int v(t) ~ d t = \int a t + v_0 ~ d t = \frac{1}{2} a t^2 + v_0 t + d_0$$
where \$v(t)\$ denotes velocity as a function of time, and \$d(t)\$ denotes distance as a function of time.  The \$(t)\$ part is just notation to remind us that it may have different values at different times \$t\$.

Remember how I said that the integral tells us the change in the total, and not the total itself?  Above, I use \$v(t)\$ to denote the final velocity, when we have a duration \$t\$ of constant acceleration \$a\$ starting at initial velocity \$v_0\$.  Similarly, \$d(t)\$ denotes the final distance, when we have a duration \$t\$ of constant acceleration \$a\$ starting at initial velocity \$v\$ and distance \$d\$.

Some mathematicians are bastards, and leave out that constant, the initial value (\$v_0\$ and \$d_0\$).  Yet, it has to be there for those of us who use integration as a tool.  Fortunately, in lists like Wikipedia's Lists of integrals, the constant (usually C) is explicitly shown.  Unfortunately, some computer algebra software like wxMaxima omit the constant: if you ask integrate(a*t, t); it tells you a*t^2/2, and leaves out the constant (initial value), "because it is obvious".

If we specify a time interval, say from \$t = t_1\$ to \$t = t_2\$, then we get definite integrals.  This means we can use
$$v_\Delta(t_1, t_2) = \int_{t_1}^{t_2} a ~ d t = (a t_2) - (a t_1) = a ( t_2 - t_1 )$$
to calculate the change in velocity due to constant acceleration from time \$t_1\$ to time \$t_2\$.   As you may notice, the constant (\$v_0\$) is omitted, because we're integrating over an interval, i.e. the integral is definite.  The constant is only added for indefinite integrals.

The change of distance due to constant acceleration from time \$t_1\$ to time \$t_2\$ is
$$d_\Delta(t_1, t_2) = \int_{t_1}^{t_2} v(t) ~ d t = \int_{t_1}^{t_2} a t + v_0 ~ d t = \left( \frac{1}{2} a t_2 + v_0 t_2 \right) + \left( \frac{1}{2} a t_1 + v_0 t_1 \right) = \frac{a}{2} \left( t_2^2 - t_1^2 \right) + v_0 \left( t_2 - t_1 \right )$$
Note that  we integrate over the velocity as a function of time (\$v(t)\$), and not over the change in velocity from \$t_1\$ to \$t_2\$ (\$v_\Delta(t_1, t_2)\$), just as before.  When we have nested integrals over the same variable(s), only the outermost integral is definite.  This is why this has the constant \$v_0\$, but not the constant \$d_0\$.

Problems like "If you are shot upwards from a cannon at \$20 m/s\$ on a flat plain, considering only acceleration due to gravity \$g = 9.8 m/s^2\$ and ignoring air drag and such, how long will you fly before you splat on the ground, to the same level you were shot from?" are solved by working out the equation for \$d(t)\$,  then substituting \$d_0 = 0 m\$, \$v_0 = -20 m/s\$, and solving \$d(t) = 0\$ for \$t \gt 0\$.  The solution is \$t = \frac{200}{49} s \approx 4.08 s\$.  If you want to find out how high the apex is, you solve for \$v(t) = 0\$ (because at the apex, your velocity is zero), and the answer is obviously \$t = \frac{100}{49} \approx 2.04 s\$ – halfway the parabolic arc –, and then substitute \$t\$ into \$d(t)\$, getting \$-\frac{1000}{49} m \approx -20.4 m\$.  It is negative because acceleration down is positive, therefore up is negative.



In electronics, we have both integrator and differentiator circuits.  These integrate and differentiate voltage or current, within practical limitations (especially frequency or rate of change and the voltage rails available).

Current integrators measure change in charge.  (Current is charge over time, and the integral of current over time has the same units as charge.)
As far as I know, voltage integrators don't have an intuitive analog; they just integrate the voltage over time, as if it could be accumulated somehow.

Voltage differentiator describes the instantaneous rate of change in voltage, and current differentiator the instantaneous rate of change in current.
("Instantaneous rate of change" just means that the rate of change described is at that instant in time, not over any interval.)



Between discrete and continous integrals and differentials, there are a number of methods with their own benefits and limitations.  "Riemann integral", for example, just means dividing the measured value or function into discrete segments (in time, or whatever variable you are integrating with respect to), and using a single sample as the average over that interval: Multiply the sample by the segment width, and sum them together, and you approximate the integral.

If you instead use the sample at both ends of each interval (assuming the value changes linearly from one to the other), you get "trapezoidal rule".  More complicated sampling and fitting get you Newton–Cotes formulas, Simpson's rules, and so on.

At the extreme end (in my opinion), you get things like Monte Carlo integration, which approximates the integral by sampling the value or function randomly.  It sounds ridiculous, but when you have an integral over multiple variables, like you often have in certain Physics problems, and the function overall is "wavy but not spiky", it can be the computationally cheapest way to obtain a good approximation!

Wait, integral over multiple variables? What?

Time is not the only variable you can integrate over.  You can integrate over length to calculate area, and area over length to calculate volume, for example.  If you have a cube with sides \$a\$, \$b\$, \$c\$, you can calculate its volume \$V\$ via a triple integral,
$$V = \int_0^a \int_0^b \int_0^c ~ 1 ~ dx ~ dy ~ dz = a b c$$
where the constant \$1\$ just means that the measurement space is flat (each infinitesimal point in space is exactly \$1\$ infinitesimal volume unit in volume).  If you had a container full of dust, packed so that at \$z=0\$ it has density \$\rho_0\$, and at \$z = a\$ it has density \$\rho_a\$, linearily varying in between –– density being amount (usually mass) of dust per unit volume, so \$\rho(z) = \rho_0 + (\rho_a - \rho_0) \frac{z}{a}\$ ––, you can calculate the amount of dust \$M\$ via
$$M = \int_0^a \int_0^b \int_0^c ~ \rho_0 + (\rho_a - \rho_0) \frac{z}{a} ~ dx ~ dy ~ dz = \frac{\rho_a + \rho_0}{2} a b c$$
which is the same amount if we estimated the average density to be the average of \$\rho_a\$ and \$\rho_0\$, as it should.

It is a powerful tool, but since we typically use the names of their discoverers (or re-discoverers) for all kinds of stuff, it is quite a memory load to grasp it all at once.  This is why I want to describe things using analogs and examples to give an intuitive understanding before one goes into the details, because it seems to make the learning part easier.  (One could say that it is akin to constructing a memory palace, for method of loci, before populating it –– except designed for new tools and application instead of just memorizing details.)
« Last Edit: November 19, 2022, 02:46:13 pm by Nominal Animal »
 
The following users thanked this post: RJSV

Offline JDubU

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: us
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #17 on: November 19, 2022, 02:46:13 pm »
Watch this documentary!

PBS Nova -- Zero to Infinity


It is the simplest, most intuitive presentation I've seen on what Calculus (limits, integrals, differentials) is about and why it needed to be created.
« Last Edit: November 19, 2022, 04:02:41 pm by JDubU »
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 9003
  • Country: us
  • Retired, now restoring antique test equipment
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #18 on: November 19, 2022, 04:28:31 pm »
"Current integrators measure change in charge.  (Current is charge over time, and the integral of current over time has the same units as charge.)
As far as I know, voltage integrators don't have an intuitive analog; they just integrate the voltage over time, as if it could be accumulated somehow."

An example of current integration to get charge is current flowing into a capacitor, where the resulting charge is the time integral of the current.
Similarly, the time integral of voltage in an inductor is the flux linking the inductance, where 1 V-s = 1 Wb = 1 T m2.
The latter is usually considered when calculating the emf from a change in flux:  V = d(BA)/dt
 
The following users thanked this post: Nominal Animal

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #19 on: November 19, 2022, 06:02:56 pm »
Great post!


Distance, velocity, acceleration, and jerk are the most commonly used examples of integrals and derivatives, though.  "Change" is distance, "rate of change" is velocity (speed), and "rate of rate of change" is acceleration.  Jerk is the "rate of rate of rate of change"; for example, when a car speeds up, it is the change in acceleration.


Let's not forget 'jounce' or 'snap' as it is sometimes called.  The rate of change of 'jerk'.  Apparently, this is used in automotive engineering but I don't know that.

Quote

At the extreme end (in my opinion), you get things like Monte Carlo integration, which approximates the integral by sampling the value or function randomly.  It sounds ridiculous, but when you have an integral over multiple variables, like you often have in certain Physics problems, and the function overall is "wavy but not spiky", it can be the computationally cheapest way to obtain a good approximation!


One of the most intuitive ways to think about integration.  Percent of bounded area.

Voltage integrators are useful for modeling physical properties.  The problem with differential equations is that they are hard or impossible to solve.  Take the equation and keep integrating until all of the derivatives disappear.  Then use some op amp integrators to model the resulting system of equations.  Like the rocket nozzle controls on the Atlas missile.  We had a HUGE analog computer working on that problem.  In undergrad, our Controls instructor really was a rocket scientist.  Smart guy...

The PDF attached to reply 5 shows how to integrate out of a 2d order ordinary differential equation.  On careful reflection, it shows the power of the '=' sign to create the highest derivative term on the left hand side from the remainder of the equations on the right hand side.  Magic!

I like the exposition, keep on writing!
« Last Edit: November 19, 2022, 06:17:52 pm by rstofer »
 
The following users thanked this post: Nominal Animal

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #20 on: November 19, 2022, 06:35:28 pm »
Machine Learning (at least Deep Learning) is nothing more than messing around with partial derivates in N dimensional space where N can be a really big number (multiple thousand dimensional space).  And we want to follow a ball down the slope toward a minimum cost (gradient descent).

Even the well understood Digit Recognition problem uses 784 dimensional space.  It's the equivalent of "Hello World!" for Deep Neural Networks.  About 17 lines of Python/Tensorflow/Keras code according to the book but I added white space so 26 lines.

https://en.wikipedia.org/wiki/MNIST_database

It's hard (impossible) to even comprehend 784 dimensional space.  And that's just "Hello World!".

"Deep Learning with Python, Second Edition" Francois Chollet

https://www.amazon.com/Learning-Python-Second-Fran%C3%A7ois-Chollet-ebook/dp/B09K81XLN1

Note that the Kindle version costs more than the paperback.  I like to read from paperbacks kicking back in my recliner but I like to recreate code from a tablet or PC at a cluttered workstation.  I have both incantations.

I'm starting to think that a degree in Applied Mathematics would be useful these days.

Quoting from the book:

Code: [Select]
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras.datasets import mnist

(train_images, train_labels), (test_images, test_labels) = mnist.load_data()

model = keras.Sequential([
    layers.Dense(512, activation = "relu"),
    layers.Dense( 10, activation = "softmax")
])

model.compile(
    optimizer = "rmsprop",
    loss = "sparse_categorical_crossentropy",
    metrics = ["accuracy"]
)

train_images = train_images.reshape((60000, 28 * 28))
train_images = train_images.astype("float32") / 255
test_images  = test_images.reshape((10000,28 * 28))
test_images  = test_images.astype("float32") / 255

model.fit(train_images, train_labels, epochs = 3, batch_size = 128)

test_loss, test_acc = model.evaluate(test_images, test_labels)
print(f"test_acc: {test_acc}")

This approach gets about 98% accuracy on the test data and some of that isn't even human readable with certainty.

« Last Edit: November 19, 2022, 06:42:07 pm by rstofer »
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7193
  • Country: fi
    • My home page and email address
Re: SOLVED: “Integrals” & “integrator”: clear … AS MUD
« Reply #21 on: November 19, 2022, 10:11:29 pm »
Some of the most sensitive image sensors are really just charge integrators below a photoelectric surface.  Basically, the number of photons (with wavelength/frequency within the sensitive band) hitting that pixel directly correlates to the charge in that pixel, and thus the charge indicates the brightness of the image at that pixel.

Tomography is a method where combining 2D images of the same translucent object/system/material taken at different angles reveals the 3D structure.  The idea is that in each 2D image, each point represents an integral of the density through the object/system/material along that ray.  For example, if you have three images, each taken perfectly along an axis, then a point in one image will be a row or column of points in the other.  If each image is N×N samples/rays, you have N×N×N unknowns (density in each voxel), and 3×N×N equations - an equation for each point in each image (each point being a sum of N voxels' densities – again, switching from continuous integrals to discrete integrals: sums).  To be able to resolve each voxel with any kind of sensible probability or reliability, a lot more images are needed; on the order of N, actually.  (The exact methods of how this is done in practice are very interesting reading, by the way, if one is interested in computational imaging.  Lots of really clever ways of doing this efficiently, without compromising reliability.)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf