Control theory -  integrator? - Page 1
Forum section: electronics / beginners

author: nForce
author_rank: Frequent Contributor
timestamp: December 10, 2018, 07:35:38 pm
content: 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?

author: kim.dd
author_rank: Newbie
timestamp: December 10, 2018, 08:48:16 pm
content: 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 - Y[n-1] = (ts/Ti)*X[n-1]Y = 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 - Y[n-1] = (ts/Ti)*XY = Y[n-1] + (ts/Ti)*XFor the last one:Y(z)*(1 + (-1)*z^-1) = X(z)*((0.5*ts/Ti) + (0.5*ts/Ti)*z^-1)Y - Y[n-1] = 0.5*(ts/Ti)*(X+X[n-1])Y = Y[n-1] + 0.5*(ts/Ti)*(X+X[n-1])

author: rstofer
author_rank: Super Contributor
timestamp: December 10, 2018, 09:19:53 pm
content: 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.

author: kim.dd
author_rank: Newbie
timestamp: December 10, 2018, 09:50:06 pm
content: I agree all lines are equivalent, he just converted the integral equation to a differential equation. They all say the same thing

author: nForce
author_rank: Frequent Contributor
timestamp: December 11, 2018, 04:32:49 pm
content: So this is the integrator term in control theory?And for a differentiator is the same only reverse?

author: rstofer
author_rank: Super Contributor
timestamp: December 11, 2018, 05:09:45 pm
content: 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)

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 11, 2018, 05:21:48 pm
content: 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 anequivalencebetween 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

author: IanB
author_rank: Super Contributor
timestamp: December 11, 2018, 05:50:31 pm
content: 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.

author: rstofer
author_rank: Super Contributor
timestamp: December 11, 2018, 06:23:11 pm
content: Quote from: IanB on December 11, 2018, 05:50:31 pmLaplace 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!

author: nForce
author_rank: Frequent Contributor
timestamp: December 11, 2018, 07:31:29 pm
content: What about block algebra -> integrator term?

author: rstofer
author_rank: Super Contributor
timestamp: December 11, 2018, 08:22:15 pm
content: 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 yhttp://fourier.eng.hmc.edu/e102/lectures/Laplace_Transform/node15.htmlBlock 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

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 11, 2018, 10:55:14 pm
content: Quote from: IanB on December 11, 2018, 05:50:31 pmNormally, 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

author: nForce
author_rank: Frequent Contributor
timestamp: December 12, 2018, 03:43:15 pm
content: If we have a derivative term it's the opposite of this?Try to answer, my questions: "Yes, because..." or "No, because..."Thanks.

author: IanB
author_rank: Super Contributor
timestamp: December 12, 2018, 04:41:14 pm
content: Quote from: nForce on December 12, 2018, 03:43:15 pmThe 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.

author: nForce
author_rank: Frequent Contributor
timestamp: December 12, 2018, 05:06:42 pm
content: 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.

author: IanB
author_rank: Super Contributor
timestamp: December 12, 2018, 07:45:48 pm
content: Quote from: nForce on December 10, 2018, 07:35:38 pmIt's giving a first order backward difference approximation to the first derivative dY/dt.

author: nForce
author_rank: Frequent Contributor
timestamp: December 13, 2018, 03:58:25 pm
content: 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 13, 2018, 05:02:00 pm
content: 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_methodsAgain, the notation seems to be wrong. "x - 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

author: nForce
author_rank: Frequent Contributor
timestamp: December 13, 2018, 05:59:07 pm
content: Ok, I will use your (standard) notation in the future.

author: rstofer
author_rank: Super Contributor
timestamp: December 13, 2018, 06:53:53 pm
content: Quote from: nForce on December 13, 2018, 03:58:25 pmHere 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-14273Notice 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.

author: IanB
author_rank: Super Contributor
timestamp: December 13, 2018, 07:09:37 pm
content: Quote from: nForce on December 13, 2018, 05:59:07 pmThe first order backward difference approximation would be like this:$${dx\over dt} \approx {{x(t)-x(t-\Delta t)} \over \Delta t}$$