1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Integration and Differentiation

Discussion in 'Mathematics and Physics' started by koolguy, Oct 23, 2015.

  1. koolguy

    koolguy Active Member

    Joined:
    Aug 24, 2010
    Messages:
    2,196
    Likes:
    9
    Can we use this Integration and Differentiation in micro ??
     
  2. KeepItSimpleStupid

    KeepItSimpleStupid Well-Known Member Most Helpful Member

    Joined:
    Oct 30, 2010
    Messages:
    9,970
    Likes:
    1,099
    the term is "numerical methods" Both integration and differentiation are done all the time when implementing a PID algorithm.
     
    • Like Like x 1
  3. koolguy

    koolguy Active Member

    Joined:
    Aug 24, 2010
    Messages:
    2,196
    Likes:
    9
    how it is done?
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ

    Hi,

    Basic integration in time is done by accumulating the input times the time increment.
    So if you take samples every 0.1 second you have a time increment of 0.1 second so you multiply each sample by 0.1 and add that to the previous result:
    sum=sum+dt*v[k]
    where
    dt is the time increment,
    v[k] is the sample measurement at that time.

    The basic first derivative in time can be calculated by taking the difference of two successive samples and divided by the time increment:
    dv/dt[k]=(v[k+1]-v[k])/dt

    and a slightly better way is to take samples at k-1 and at k+1:
    dv/dt[k]=(v[k+1]-v[k-1])/(dt+dt)

    where you might note that we get the derivative for the sample k by using samples k-1 and k+1 rather than sample k itself. It's sometimes referred to as the "Central Means" derivative.

    There are a lot of different numerical methods for different things so you might look into this more on the web or ask more questions here :)
     
    • Like Like x 1

Share This Page