Unable to run simulation for a PV microgrid

조회 수: 45 (최근 30일)
Ajibola Adeleke
Ajibola Adeleke 2021년 7월 27일
이동: DGM 2022년 12월 25일
I keep getting the error below when running my simulation for a PV microgrid:
An error occurred while running the simulation and the simulation was terminated
Caused by:
Derivative of state '1' in block 'untitled_real/PV Array/Diode Rsh/Transfer Fcn' at time 0.01 is not finite. The simulation will be stopped. 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)
  댓글 수: 2
Kamran Awan
Kamran Awan 2022년 7월 5일
이동: DGM 2022년 12월 25일
were you able to solve this issue?
Pratyush Das
Pratyush Das 2022년 12월 25일
How was it solved?

댓글을 달려면 로그인하십시오.

답변 (1개)

Kiran Felix Robert
Kiran Felix Robert 2021년 9월 24일
편집: Kiran Felix Robert 2021년 9월 24일
Hi Ajibola,
This message may be caused by a singularity in your system. One situation where this may occur is if the values of your states differ by a large magnitude. If this is the case, the Simulink solver will have a hard time resolving your step size within the error tolerance as it attempts to "bounce" back and forth between the states.
To check if this is the case:
1. Return the states of your system as follows:
a) In the model editor go to Simulation-> Configuration Parameters
b) Select Data Import/Export, in the 'Save to Workspace' field, check 'States' to log the states as output
2. Run the simulation.
3. Plot:
plot(tout,xout)
You can see if one of the states is changing over a wide range compared to the others.
There are a couple of things you can do to try to correct this situation.
If possible, you may want to rescale the model so that the states are within a couple of orders of magnitude of one another.
Also, you can set specific error tolerances for the integrator blocks (if any) in your system.
For more information, please refer to 'Specifying the Absolute Tolerance for the Block's Outputs' section in the Integrator block documentation by entering
doc integrator
at the MATLAB command prompt.
To Resolve these, you may also try the following:
Use a stiff solver (e.g. ode15s)
Decrease initial step size, maximum step size, and relative tolerance

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by