An error in my model Simulink model
22 views (last 30 days)
Show older comments
=== Simulation (Elapsed: 3 sec) ===
pulse =
1
Error:An error occurred while running the simulation and the simulation was terminated
Caused by:
Derivative of state '1' in block 'chargecontrol/PV Array/Diode Rsh/Transfer Fcn' at time 0.0 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) I am getting the following error while running the above model with a PV array and I see no error if I put a constant DC source what is this eeror and how to solve it
5 Comments
JinWook Park
on 12 Dec 2024
I think the problem is caused by the fact that the solver is Discrete and the powergui is Continuous.
Set the two types to the same
Answers (1)
Yukthi S
on 12 Dec 2024
I figured out that the Simulink model you have shared has a singularity condition. To know that, navigate to Configuration parameters>Diagnostics>Data Validity and set Inf or NaN block output to error and run the model step by step. I got the below error message at time T=0:
An error occurred while stepping through the simulation and the simulation was terminated
Caused by: Block 'chargecontrolpvarray/PV Array/Diode Rsh/Math Function' outputs 'Inf' for element 1 of output port 1 at major time step 0
To check why this is happening, I displayed the values of in-ports and out-ports of Math Function as shown below:
It is found that the value of {V_diode} being too high is responsible for high value input to the Math Function block. That is likely the reason for singularity error in the model. To fix this, adjust the model to reduce the {V_diode} value. This should help resolve the error.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!