Why is their an offset when I intergrate a simple sin(1*x) in simulink using the (1/s) block?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Their seems to be a -1 offset when I intergrate a sin(x) signal using a 1/s block. the sin(x) goes from -1 to 1 and the resulting intergation goes from 0 to 2? Is their a paramater i'm missing?
0 comentarios
Respuestas (1)
Ryan G
el 10 de Sept. de 2013
You need to set the initial condition of the integrator. I believe I cover this a bit in the intro to simulink webinar. This should help you ramp up if you're just getting started.
2 comentarios
Ryan G
el 11 de Sept. de 2013
You're thinking of the solution analytically instead of numerically. The integral block only receives a value. It doesn't know if the value came from a sin , cos or a constant.
For example: At time t= 0 that value is into the integrator 0, time t=0.1 that value is sin(0.1)=0.0998 and the previous state (t=0) is 0. It will then integrate between those inputs using deltaT=0.1 with an IC of 0.
The time step changes dynamically based on the ODE45 (solver) algorithm tolerances.
Ver también
Categorías
Más información sobre General Applications en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!