Not enough input derivatives were provided for one or more Simulink-PS Converter blocks for the solver chosen.
142 次查看(过去 30 天)
显示 更早的评论
Here is a portion of my simulink diagram. I set my sine wave units in degrees and input handling as below. Simlunk gave me those two errors when running my program.
['testSpinningMassInBall']: Not enough input derivatives were provided for one or more Simulink-PS Converter blocks for the solver chosen. Implicit solvers (ode23t, ode15s, and ode14x) typically require fewer input derivatives than explicit solvers, and local solvers never require any. The following Simulink-PS Converter blocks have continuous inputs. To provide the derivatives required, you can either turn input filtering on or provide the input derivatives explicitly by selecting the corresponding options on the Input Handling tab: ...'testSpinningMassInBall/Simulink-PS Converter' (2 required, 1 provided)
Component:Simulink | Category:Block diagram error
Error evaluating 'StopFcn' callback of block_diagram 'testSpinningMassInBall'. Callback string is 'Elapsed_Sim_Time = toc; disp(['Elapsed Sim Time = ' num2str(Elapsed_Sim_Time)]); '
Caused by:
- You must call TIC without an output argument before calling TOC without an input argument.
Component:Simulink | Category:Block diagram error
2 个评论
Shashwat Bajpai
2019-7-17
Hi,
I understand that you are getting an error in the PS-Simulink converter section and in the StopFcn callback.
Do you have any more PS-Simulink Converters? Also "toc" can only be used with a preceding "tic".
Massimo Sirigu
2019-12-26
hello,
you need to expand ps-simulink connector in 3 inputs by using 'provide signals' and 2 derivatives and then you should pass such signal with its first and second derivative, calculated by derivative or integrator blocks, it's like the signal is composed of position, velocity and acceleration.
回答(1 个)
Luke Halberstadt
2020-11-10
You have several options for resolving this kind of issue as mentioned in the error message:
- Choose an implicit solver such as ode23t. It is worth noting that this does not always resolve the issue.
- Enable filtering. This may have failed in your case because the Simulink-PS Converter dialog’s settings had not yet been applied. Some form of filtering should generally resolve the error with an associated impact on simulation performance and accuracy.
- Provide derivatives from Simulink by adding a Cosine and -Sine input as the first and second derivatives of the signal provided to the Simulink-PS Converter. For an analytical sine wave input, this is your best option.
Using a simple example model, I found the following working combinations:
Solver ode45 with second-order filtering took 4352 steps (first-order errors out)
Solver ode23t with first-order filtering took 251 steps (second-order is not necessary)
Solver ode45 with two provided derivatives (Cos and Negative Sine) took 79 steps.
To understand the behavior in greater detail, I encourage you to read the following Documentation pages on the Simulink-PS converter and filtering:
Simulink-PS Converter: Input Handling
Filtering Input Signals and Providing Time Derivatives
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Variable Initialization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!