MATLAB Answers

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

278 ビュー (過去 30 日間)
Xiaolin Wang
Xiaolin Wang 2019 年 6 月 30 日
回答済み: Luke Halberstadt 2020 年 11 月 10 日
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
testSpiningMassInBall_error_6_29(1).JPG
  2 件のコメント
Massimo Sirigu
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
Luke Halberstadt 2020 年 11 月 10 日
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

Community Treasure Hunt

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

Start Hunting!

Translated by