Hi Tobi,
Ideally, the derivative of the integration should match with the original signal. There could be a variety of reasons why the value is not the same. It is not possible to determine the exact reason without actually examining your model. Kindly share the ".slx" file with us for better analysis.
From your provided screenshots, I can identify a few possible sources of the discrepancy:
- External Reset: The screenshot shows that a rising external reset is configured to the integrator block. This will reset the integrated value to zero whenever there is a rising edge in the signal. This may alter the behaviour of the model.
- Initial Conditions: Generally, initial conditions don't impact the derivative since they represent a constant offset. However, it's worth experimenting with different initial conditions to observe any effects.
- Other Parameters: Review other parameters, such as the value of "c" in the "Derivative" block or any options within the "Integrator" block, to ensure they're set correctly.
- Sample time: There might be a possibility that the Integrator and the derivative block are properly configured but the sample time or the step size is causing the issue.
For troubleshooting, consider implementing the integrator and differentiator manually using a "MATLAB Function" block. Comparing these manual implementations to the existing block outputs can help isolate the problem and determine which block might be at fault.
Hope this helps in resolving the issue.