My model contains a number of differential equations, that converge only if I set an appropriate initial condition.
The model per se is correct (I double-checked both the model and the initial conditions with Simulink), but the
corresponding SystemC-AMS implementation diverges after few samples.
I set the initial condition as the third parameter of the constructor, e.g.:
sca_lsf::sca_integ * myInteg;
...
SC_CTOR(myModule){
myInteg = new sca_lsf::sca_integ("myInteg", 1.0, 5.0);
...
};
where the initial condition is 5.0. Is this correct?
Best regards,
S.