Hi I have a basic doubt about the integrator block in simulink

Normally when we integrate a sine wave we will be getting a cosine wave, right? But when I tried to do the same in simulink I got a sine wave which looks like it has been clamped to positive side, meaning the whole wave was shifted upwards. I dont understand this. Please help me...

 Accepted Answer

Sreerag, the integral of sine is a negative cosine plus an integration constant. Integrating a sine between 0 and pi results in 2, which is also the peak value you should see in the scope (if the intial condition in the integrator block is set to zero). If you don't open the Model Configuration Parameters in the Simulink Model window and adjust the solver options, e.g., solver, step sizes, relative, and absolute tolerances.

2 Comments

I accept the idea. But what if I have a signal coming out of some equation as an alternating quantity and I want to integrate the same, then I wont have an idea about what will be the integration constant. So the output will be erroneous, right?
No. Once you have defined limits of integration (which you have once you define intitial conditions and the simulation time) there is no more integration constant, the result is unique.

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!