Simulink Integrator block: how to

Hi:
I'm trying to figure out how exactly the integrator block (Simulink) works, I mean, How can be calculated manually? (e.g. if a ramp signal is integrated, a parabola is obtained)
Thanks.

Respuestas (2)

Andreas Goser
Andreas Goser el 19 de Dic. de 2013

0 votos

Simplified, it is new_value equals old_value plus increase and the increase is gradient divided by step size. The question now is how deep you are in math, e.g. for an university student of engineering I would recommend different material than if you are going to college.

1 comentario

soko loko
soko loko el 19 de Dic. de 2013
Thank you for the response. By the way, I'm a mechatronics engineering student. Could you describe the above calculations with equations? How is the gradient obtained?

Iniciar sesión para comentar.

ES
ES el 19 de Dic. de 2013

0 votos

What do you mean by how exactly? integration of ramp is indeed a parabola.. example y=mx, integration of y=integration(mx)=(mx^2/2) which is indeed a parabola's equation..

8 comentarios

ES
ES el 19 de Dic. de 2013
And as you might know, physical meaning of integration is area under a curve. So if you consider a ramp, if you add up the area under a ramp, it will increase in such a way following the curve of a parabola.
soko loko
soko loko el 19 de Dic. de 2013
Well, I know about that kind of integration, but what if you introduce a signal of which you dont have any formula? What I'm trying to figure out is how the integrator works in order translate it to equations.
In order to clarify see the enclosed image. These curve were obtained from a doble RC circuit modeled with space-state representation. The curves on the right are voltage vs time (step = 1 volt), these curves are obtained integrating the curves on the left. I know that there area under both curves (Scope 9) is equal to 1. What I'm trying yo figure out is what calculations is Matlab doing to obtain these results.
Kaustubha Govind
Kaustubha Govind el 19 de Dic. de 2013
How the integration is done depends on what solver you have chosen for your model. You may want to read Choose a Solver to see the various solvers and how they perform integration.
soko loko
soko loko el 19 de Dic. de 2013
Well, let's say is being solved with the Dormand-Prince method (ode45). What are the steps to be followed?
Guy Rouleau
Guy Rouleau el 20 de Dic. de 2013
Those steps:
in MATLAB, type "edit ode45" and you will be able to make the the 1-1 mapping between equations in the above link and the MATLAB code.
soko loko
soko loko el 20 de Dic. de 2013
Thank you. What I dont understand is what equation is Simulink solving since only values are entereing to the integrator and not an equation.
ES
ES el 20 de Dic. de 2013
You dont need an equation to integrate. As I said before, integration is merely area under curve. suppose your sample time is 0.1 seconds, so your time signal is [0,0.1,0.2,0.3,0.4,...]. Your Actual Signal may be [0,4,2.3,-3.4,3,...]. corresponding to the time values defined above. lets assume t1=time[0]=0; t2=time[0]=0.1; dt=t2-t1=0.1; signal has changed from 0.4 t0 2.3. This region is almost a trapezoid. area under this curve is a the area of trapezium within these lines(x=0 [for y-axis or t1=0],y=0[for x-axis], x=0.1 [for t2=0.1] and y=mx+c where m=2.3/0.4 indicating slope].. Thus the total area is calculated as an summation of such tiny areas.
Now what I have described above is simple, it is called trapezoidal integration. The normal integration is similar in concept but more continuous and more generic.
soko loko
soko loko el 20 de Dic. de 2013
Thank you for the explanation!. I was able to reproduce the behavior of the integrator block in Excel using the Euler method. By the way, speaking generally, what method is best the trapezoidal or Euler method?

Iniciar sesión para comentar.

Categorías

Más información sobre General Applications en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 19 de Dic. de 2013

Comentada:

el 20 de Dic. de 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by