0
$\begingroup$

I am testing the Simulink discrete integrator block as shown in the picture below. The simulation is fixed step with $T_s = 1e-5$ and the cosine wave block setting and the scope display is also shown below.

enter image description here enter image description here enter image description here

For the discrete integrator block, the gain value K is set to be 1 and the integration method was chosen to be "Accumulation: Forward Euler". However, how come the magnitude of the result is so big as shown in the top part of the scope picture? I thought integrating a cosine wave will produce a sine wave with the same magnitude. If the integration method is chosen to be "integrator: Forward Euler", the result becomes very small, as shown below. It just can't produce a sine wave with magnitude of 1. How to get the correct result? enter image description here

$\endgroup$
1
$\begingroup$

All of a sudden I realized I made a silly mistake. $$ \int \cos(\omega\cdot t)dt=\frac{1}{\omega}\sin(\omega\cdot t) $$ which means the "integrator: Forward Euler" choice produced the correct result.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.