Clear Filters
Clear Filters

Not enough input derivatives were provided for one or more Simulink-PS Converter blocks for the solver chosen.

168 views (last 30 days)
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 errortestSpiningMassInBall_error_6_29.JPG
Shashwat Bajpai
Shashwat Bajpai on 17 Jul 2019
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
Massimo Sirigu on 26 Dec 2019
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.

Sign in to comment.

Answers (1)

Luke Halberstadt
Luke Halberstadt on 10 Nov 2020
You have several options for resolving this kind of issue as mentioned in the error message:
  1. Choose an implicit solver such as ode23t. It is worth noting that this does not always resolve the issue.
  2. 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.
  3. 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


Find more on Physical Units in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!