Cannot solve algebraic loop involving

27 ビュー (過去 30 日間)
Viet Dung
Viet Dung 2024 年 6 月 10 日
回答済み: Sam Chak 2024 年 6 月 11 日
Cannot solve algebraic loop involving 'Simulation_vehicle/Equation1_ddgama1/MATLAB Function5' because it consists of blocks that cannot be assigned algebraic variables, such as blocks with discrete-valued outputs, blocks with non-double or complex outputs, Stateflow blocks, or nonvirtual subsystems. Consider breaking the algebraic loop. For example, add a delay or a memory block to the loop. To see more details about the loops use the command Simulink.BlockDiagram.getAlgebraicLoops(bdroot)
Component:Simulink | Category:Model error
Input ports (23) of 'Simulation_vehicle' are involved in the loop.
How to fix this error ?
  2 件のコメント
Sam Chak
Sam Chak 2024 年 6 月 10 日
Hi Viet Dung
I suspect that you have unknowingly or accidentally constructed a functional signal loop in this manner:
x(t) = f[x(t)]
without providing the initial value x(0).
How do you to calculate the output value for the current time step with the input value to the function for the current time step?
Viet Dung
Viet Dung 2024 年 6 月 11 日
Hi Sam Chak. An error occurred while running the simulation and the simulation was terminated
Caused by:
Derivative of state '1' in block 'NAM_Mo_phong_xe/Equation1_ddgama1/Integrator' at time 0.0030900000000000003 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)
How to fix this ?

サインインしてコメントする。

回答 (1 件)

Sam Chak
Sam Chak 2024 年 6 月 11 日
% Derivative of state '1' in block 'NAM_Mo_phong_xe/Equation1_ddgama1/Integrator' at time
% 0.0030900000000000003 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)
The error message indicates that around seconds, the value of the input signal entering the 'Integrator' block exceeds the processing capabilities of the Simulink solver. When the signal value increases dramatically within a very short time frame, such that the rate of change approaches infinity, a singularity may have occurred at the output of the preceding block before reaching the 'Integrator' block.
In the provided example, since the 'Gain' block is situated upstream of the 'Integrator' block where the error message identifies the value at approximately as non-finite, the issue appears to be with the exceptionally large output of from the 'Gain' block. This should be the focus of the investigation!
we need to

カテゴリ

Help Center および File ExchangeConfigure Simulation Conditions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by