Integrator error: Integrator in Simulink 2021a, I input a negative nymber but the output is a positive integral value

2 views (last 30 days)
Fig. 1 the -2.6 is input and the 1.53e+6 is the output of the integrator
Fig. 1 the -2.7 is input and the 1.58e+6 is the output of the integrator
Compare Fig.1 and Fig.2, the input of the integrator is both negative numbers, while the integral value become larger, which is wrong. Who can solve my problem? Many thanks!

Answers (1)

Sam Chak
Sam Chak on 8 Apr 2023
The integrator could be integrating from an initial positive value.
  3 Comments
Sam Chak
Sam Chak on 8 Apr 2023
Is the input signal to the Integrator (as shown in Fig. 3) some kind of a bounded random signal?
Also, test if your Integrator behaves correctly by integrating . The output on the scope should show a sine signal.
壮 王
壮 王 on 9 Apr 2023
Thank you, the input signal is not a bounded random number, It is just the battery current, and the time step in my Simulation is 600s. Besides, I have tested the Cos function and the result was same as yours. Maybe, I should analysis how the Ingegrator works furtherly. I test two different blocks, namely the “Ingegrator” and the "Discrete-Time Integrator1" , the result showed that the the "Discrete-Time Integrator1" gives a correct result.

Sign in to comment.

Categories

Find more on Simulink in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!