How to read a signal with discontinuities from workspace in simulink?
Show older comments
I have a standard validation signal and want to read it from workspace as the input of my model in Simulink and then compare the output of model with the one from measurements. As it is a validation signal I can not change the signal in order to remove the discontinuities. Whenever I try to run the model I receive a error regarding the singularity problems over the integrator blocks in my model, because of having discontinuities.
Derivative input 1 of 'laplace_domain_test_V2/ct & dl & Warburg/Integrator' at time 140.0042 is Inf or NaN. Stopping simulation. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
I tried to reduce the step size to very small values & tightening the error tolerance and also to change the solver to the stiff ones but the problem is still unfixed. Can any one please suggest a way to get rid of this error?
I really appreciate your help in advance!
Accepted Answer
More Answers (1)
Fernando
on 29 Jul 2014
1 vote
Normally the problems I've encountered with that error were indeed caused by an Inf or NaN being sent to the integrator. Check if there's a chance of that happening in your model. Scope all signals forming the integrand individually to see whether you have a division by zero or you are getting a NaN due to a block initialization, etc. Depending on your differential equation arrangement, disconnecting the integrator and inspecting its input signal might give you a clue.
Categories
Find more on Discontinuities 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!