error in modeling pv array block

26 次查看(过去 30 天)
fatemeh
fatemeh 2023-12-9
评论: Nishant 2024-4-11
hello,
i design a pv array block and for input i use signal editor for irradiance and temperature from excel with 8760 data for one year. and i get this error. anyone can help me?

回答(1 个)

akshatsood
akshatsood 2023-12-10
编辑:akshatsood 2023-12-10
I understand that you are encountering an error while running the simulation with the "PV Array" block. The "Derivative state for 1" errors occur when signals in the model cannot be accurately calculated due to the adjusted step size. For instance, when a signal sees a rapid rise, it becomes challenging to capture the signal, despite attempts to increase the step size. As a result, the model provides diagnostics to bring the issue to light and requires user intervention for resolution. I would like to recommend the following two methods to debug and address the issue.
First Method: Inf or NaN output produced at a block
Open your Simulink model and execute the following commaind in the MATLAB command window.
>> get_param(bdroot, 'SignalInfNanChecking')
If the output of the above command is "none," then you should use "set_param" to set the value of this parameter to "error," which can be done through the following command
>> set_param(bdroot, 'SignalInfNanChecking', 'error')
This is done to check for the presence of "Inf" or "NaN" values being produced at the output. If this is the reason behind the error you are encountering, Simulink will generate the following error message.
An error occurred while running the simulation and the simulation was terminated
Caused by:
Block 'BlockName' outputs 'NaN' for element x of output port x at major time step 0
The above message lists the Block Name which outputs 'NaN' or 'Inf' during simultaion. From here, you can debug your model to bypass NaN or Inf values (for instance using a "Switch" block) and address the issue.
Second Method: Modifying the Solver Settings
Open the Model Configuration Parameters by pressing Ctrl+E and then navigate to Solver > Solver selection. From here, update the following fields as given below. A stiff solver is designed to handle differential equations where the solution contains both rapidly changing and slowly changing components.
Type: Variable-step
Solver: ode15s (stiff/NDF)
I hope this helps.
  1 个评论
Nishant
Nishant 2024-4-11
matlab crashes after i run the model after doing the second step.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by