Author Topic: Control theory - integrator?  (Read 2938 times)

0 Members and 1 Guest are viewing this topic.

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Control theory - integrator?
« on: December 10, 2018, 07:35:38 pm »
Hello,

I have a derivation, which I think it's for integrator. Is this from control theory?

Why is at the end difference between Y(n) and Y(n-1)? So we get a derivative?
 

Offline kim.dd

  • Newbie
  • Posts: 9
  • Country: be
Re: Control theory - integrator?
« Reply #1 on: December 10, 2018, 08:48:16 pm »
The Laplace or continuous transfer function can be transformed to a discrete transfer function using more than one transformation rule.
Not all transformation will lead to a stable or implementable solution. e.g. a stable continuous pole could end up outside the unit circle for your discrete implementation.

The three basic transformations:



For the first transform given you would get:
Y(z)*(1 + (-1)*z^-1) = X(z)*(0 + (ts/Ti)*z^-1)
Y[n] - Y[n-1] = (ts/Ti)*X[n-1]
Y[n] = Y[n-1] + (ts/Ti)*X[n-1]

For the second one:
Y(z)*(1 + (-1)*z^-1) = X(z)*((ts/Ti) + 0*z^-1)
Y[n] - Y[n-1] = (ts/Ti)*X[n]
Y[n] = Y[n-1] + (ts/Ti)*X[n]

For the last one:
Y(z)*(1 + (-1)*z^-1) = X(z)*((0.5*ts/Ti) + (0.5*ts/Ti)*z^-1)
Y[n] - Y[n-1] = 0.5*(ts/Ti)*(X[n]+X[n-1])
Y[n] = Y[n-1] + 0.5*(ts/Ti)*(X[n]+X[n-1])
 
The following users thanked this post: nForce

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Control theory - integrator?
« Reply #2 on: December 10, 2018, 09:19:53 pm »
If you look at the last 2 equations, you will see that they are identical when delta t in the last equation approaches 0 - the very definition of a derivative which is the form of the next-to-last equation.  With a little rearranging, of course.

The last equation represents delta Y over delta t  which, when delta t approaches 0 is, in fact, dY/dt.
 
The following users thanked this post: nForce

Offline kim.dd

  • Newbie
  • Posts: 9
  • Country: be
Re: Control theory - integrator?
« Reply #3 on: December 10, 2018, 09:50:06 pm »
I agree all lines are equivalent, he just converted the integral equation to a differential equation. They all say the same thing :)
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Control theory - integrator?
« Reply #4 on: December 11, 2018, 04:32:49 pm »
So this is the integrator term in control theory?

And for a differentiator is the same only reverse?
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Control theory - integrator?
« Reply #5 on: December 11, 2018, 05:09:45 pm »
s represents the derivative and 1/s represents the integral.  There are initial conditions to consider...



L{y(t)} = Y(s)
L{y'(t)} = s Y(s) + y(0)
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21684
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Control theory - integrator?
« Reply #6 on: December 11, 2018, 05:21:48 pm »
Hmm, the symbology is wrong, in that it is customary to write time-domain functions in lowercase, and frequency-domain functions in uppercase.  It should be y(t) = ... x(τ) ... (missing), and Y(s) = ... X(s) ... (correct).  At least, that's the convention over here?

The first steps are just showing the identities of integration and differentiation, which can be proved with the full form of the Laplace transform integral.

The last step is not justified: the derivative is equal only when dt --> 0.

The notation is also incorrect again: the discrete-time function is usually shown with a subscript, or a square-brackets parameter.  And the Z-domain function is again capitalized (discrete-time, lowercase), using z as the parameter.

What is needed, is to show an equivalence between differentiation in continuous-time functions, and differencing in discrete-time functions.  To a suitable degree, it turns out they are, but this requires a different kind of proof, of course.  You can't simply equate them, because a discrete-time function can't ever be equal to a smooth, continuous-time function.

As mentioned, there is a transformation between poles and zeroes in s+jw frequency space, and poles and zeroes in Z space.  It's been so long I forget which one is easier to show and work from -- it may be that the transformation itself is the easier equivalence to prove, and then everything else follows from that.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: nForce

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Control theory - integrator?
« Reply #7 on: December 11, 2018, 05:50:31 pm »
I suspect most of the mathematical material in this thread is far beyond the current level of the OP. There's plenty of stuff that's outside my working knowledge even though I know in concept what it's about.

We should keep in mind that nForce is a beginner trying to learn, and try to keep things a bit simpler.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Control theory - integrator?
« Reply #8 on: December 11, 2018, 06:23:11 pm »
I suspect most of the mathematical material in this thread is far beyond the current level of the OP. There's plenty of stuff that's outside my working knowledge even though I know in concept what it's about.

We should keep in mind that nForce is a beginner trying to learn, and try to keep things a bit simpler.

Laplace Transforms usually comes after Calc I, Calc II and Differential Equations - so it's an advanced topic by any standard.

OTOH, the OP posted the question so why should we make assumptions about his math background?

I know for a fact, I haven't thought much about this topic in the 45+ years since I took the class.  I have forgotten everything I ever knew!  And I wonder if I every really understood it in the first place...

That's the cool part about my grandson taking engineering in college, I get to do a refresh on just about everything!
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Control theory - integrator?
« Reply #9 on: December 11, 2018, 07:31:29 pm »
What about block algebra -> integrator term?
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Control theory - integrator?
« Reply #10 on: December 11, 2018, 08:22:15 pm »
Half way down the page here is a block diagram that clearly shows that 1/s is the integrator term because the input to the block is y' and the output is y

http://fourier.eng.hmc.edu/e102/lectures/Laplace_Transform/node15.html

Block algebra is a systematic way to combine transfer functions of s  and here is a really good reference on the entire topic of control systems.  There is an entire section on Block Diagram Algebra.

https://www.tutorialspoint.com/control_systems/control_systems_block_diagram_algebra.htm

 
The following users thanked this post: nForce

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21684
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Control theory - integrator?
« Reply #11 on: December 11, 2018, 10:55:14 pm »
I suspect most of the mathematical material in this thread is far beyond the current level of the OP. There's plenty of stuff that's outside my working knowledge even though I know in concept what it's about.

We should keep in mind that nForce is a beginner trying to learn, and try to keep things a bit simpler.

Normally, Laplace transforms are introduced 2nd year, after calculus, and Fourier and DSP (if applicable) 3rd or 4th.

Given the question spans all four domains, and has a homeworky flavor to it -- I don't know how else to answer such a question. ???

If this truly is a beginner question, then, I've listed all the traditional prerequisites -- please, for the love of all that is good and electronic, study them, ruthlessly!

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Control theory - integrator?
« Reply #12 on: December 12, 2018, 03:43:15 pm »
If we have a derivative term it's the opposite of this?

Try to answer, my questions: "Yes, because..." or "No, because..."

Thanks.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Control theory - integrator?
« Reply #13 on: December 12, 2018, 04:41:14 pm »
If we have a derivative term it's the opposite of this?

The first four lines of your first post are more or less a statement of the Fundamental Theorem of Calculus, which states essentially that integration is the opposite of differentiation. If you look up this theorem you will find more discussion and explanation of this.
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Control theory - integrator?
« Reply #14 on: December 12, 2018, 05:06:42 pm »
Yes, I know the fundamental theorem of calculus.

If we start with integral term, then we get a derivative. If we start with the derivative term, then we are going to get an integral.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Control theory - integrator?
« Reply #15 on: December 12, 2018, 07:45:48 pm »
Why is at the end difference between Y(n) and Y(n-1)? So we get a derivative?

It's giving a first order backward difference approximation to the first derivative dY/dt.
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Control theory - integrator?
« Reply #16 on: December 13, 2018, 03:58:25 pm »
What about first order term?

rstofer said in another topic, that this is a filter, where we have one pole.
First order term is a first order differential equation? But we got this here, which kim.dd pointed out.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21684
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Control theory - integrator?
« Reply #17 on: December 13, 2018, 05:02:00 pm »
It's called first order, because it's the first (simplest) finite difference.  This is a method to approximate the derivative:
https://en.wikipedia.org/wiki/Numerical_differentiation#Higher-order_methods

Again, the notation seems to be wrong.  "x[n] - x[n-1]" typically means a discrete-time (e.g., digital or switched-capacitor filter) application.  It's impossible to know what "Y(n)" is supposed to mean -- n usually represents an integer, yet Y(s) is usually representing a continuous function.  There would be no point in taking the value of the function at integer values, except for discrete-time purposes.

In the context of numerical analysis, it still seems to be wrong, because the step size must be adjustable in order to form a better and better approximation, to a function that may be changing arbitrarily fast (a step size of 1 is arbitrary, and will miss any details smaller than it).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: nForce

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Control theory - integrator?
« Reply #18 on: December 13, 2018, 05:59:07 pm »
Ok, I will use your (standard) notation in the future.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Control theory - integrator?
« Reply #19 on: December 13, 2018, 06:53:53 pm »
What about first order term?

rstofer said in another topic, that this is a filter, where we have one pole.
First order term is a first order differential equation? But we got this here, which kim.dd pointed out.

Here is an explanation of RC filters including their Laplace Transform.  Note from equation 1 the 1/s factor.  Yes, that looks like integration because an RC filter IS an integrator.  Think about what happens if you hit it with a step function.  Just after equation 10 (that is a LOT of math...) there is a graph of the step response and it winds up as an exponential.  Vo = Vi (1-e- t/RC), just what we expect.

But that's all in the time domain.  After equation 23, there is a graph of the frequency response and the end result is a roll-off of 20 dB per decade for a single pole filter.

https://coertvonk.com/hw/filters/low-pass-rc-filter-14273

Notice the Octave code further down, well, Octave is free and I have it so I might as well play with the equations.  Or I can convert the code to MATLAB (the two are amazingly similar) which I prefer.

I have bookmarked this page - it is the most coherent explanation I have ever read.
« Last Edit: December 13, 2018, 11:06:14 pm by rstofer »
 
The following users thanked this post: nForce

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Control theory - integrator?
« Reply #20 on: December 13, 2018, 07:09:37 pm »
Ok, I will use your (standard) notation in the future.

The first order backward difference approximation would be like this:

$${dx\over dt} \approx {{x(t)-x(t-\Delta t)} \over \Delta t}$$
 
The following users thanked this post: nForce


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf