error after 24 seconds in model
25 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
component divide
% PS Divide :0.75
% This block divides the first input signal by the second one:
% y = u_1 ./ u_2
%
% All connections are physical signal ports.
inputs
I1; % Left input signal (numerator)
I2; % Right input signal (denominator)
end
outputs
O; % Output signal (result of division)
end
equations
epsilon = 1e-1; % Small value to prevent division by zero
O = I1 ./ max(I2, epsilon); % Apply regularization to denominator
end
end
0 commentaires
Réponses (1)
Suraj Kumar
le 1 Déc 2024 à 5:51
The error that you are encountering during simulation of the model can be eliminated by using the following steps.
You can select 'Use local solver' in the ‘SolverConfiguration’ block if it is present in the model.
This allows Simscape and physical network components to utilize a specialized local discrete solver. The local solver treats the physical network as a stiff system, using an implicit solver to iteratively find the solution for the next time step with an algebraic solver.
To learn more about making optimal solver choices for physical simulation, you can refer to the following documentation:
Hope it helps!
0 commentaires
Voir également
Catégories
En savoir plus sur Simulation Setup dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!