simulink Error when run the circuit

Discussion in 'Math' started by Jadetay, Nov 23, 2010.

  1. Jadetay

    Thread Starter New Member

    Nov 21, 2010
    Any one how to solve this compliation error?
    I get this error when run the simulink.
    Error: Derivative input 1 of 'untitled/Active and Reactive Power control/Integrator2' at time 0 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).


      File size:
      163.7 KB
  2. steveb

    Senior Member

    Jul 3, 2008
    I tried to open your file, but it does not load and gives an error message. I have version 2006a of Matlab, so maybe there is a version incompatibility.

    Usually the derivative error that happens at time 0 is simple to identify, but without being able to see the file, I can't help.

    The basic issue is that the input to an integrator is not being calculated or set correctly at startup. There could be a divide by zero or similar problem.
    Jadetay likes this.
  3. kokkie_d

    Active Member

    Jan 12, 2009
    Hi Jadetay,

    I managed to open your model and run it.
    the problem you are having is I think as follows:
    The w_slip_gap is zero at startup, because your currents are zero and thus your division product is dividing by zero (the product blok before saturation in the w_slip_gap calculation) - this is only a warning although need looking at.

    In your model: OMG_MEC is an input for speed which at t=0 is zero.
    You add those values together and then try to integrate which results in the error (as steveb predicted).

    btw. your induction model looks interesting, I am working on one myself but am stuck at the controller. Any chance you want to share you controller layout or the references you used to build it?

    I am working on a PhD in Power and energy management optimisation.


    btw your model could benefit from using matrices instead of individual functions with integrators per funtion. Very error-prone method.
  4. Jadetay

    Thread Starter New Member

    Nov 21, 2010
    Hi Kokkie_d,
    I can send to sample. can u tell me ur email address? i don't think it is suitable to post it online.