Simulink Integrator

조회 수: 3 (최근 30일)
Daniel W
Daniel W 2012년 4월 19일
Looking to go back to complete basics on how some aspects of Simulink work and am running into something mathematically that seems off. I've made a simple program with blocks (sine wave)->(1/s)->(Scope) with an additional scope set up to view the initial sine wave. I've set the amplitude of the sin wave to 1 and run the program. The sine wave plot looks correct, ±1 amplitude and the wave starts at (0,0), like a normal sine wave. The integral of a sine wave is -cos, so I expect to see a wave that runs ±1 and starts at (0,1), but what simulink outputs is a sine wave that starts at (0,0) and the amplitude runs from 0 - 2, not ±1. Am I missing something on how to set up a signal to be integrated? If I use the derivative function, I do get a cos wave. Any thoughts?

답변 (1개)

Titus Edelhofer
Titus Edelhofer 2012년 4월 19일
Hi Daniel,
you are missing the initial condition: the integration of sin is -cos(x)+X0, where X0 is at first arbitrary.
But because the integration always starts at point zero:
int_0^0 sin(x) dx = 0
you get X0 = 1.
The curve you should see is not a sine but a -cosine shifted by one.
Titus
  댓글 수: 2
Daniel W
Daniel W 2012년 4월 19일
I see it now, makes sense. Thank you.
Kaustubha Govind
Kaustubha Govind 2012년 4월 19일
Daniel: Please accept Titus' answer since it has resolved your issue.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by