Help in Solver error

Appear this error:
Nonlinear solver: failed to converge, residual norm too large.
Transient initialization, solving for consistent states and modes, failed to converge.
Here is the set of components with unconverged equations:
'testeCarga/Subsystem1/Switch'
How i resolve this? Please someone help me. Thanks ;)

Answers (2)

Arnaud Miege
Arnaud Miege on 19 Jul 2011

2 votes

It really isn't difficult, you need to start thinking... The following is pretty self-explanatory:
Arnaud
Nuno
Nuno on 18 Jul 2011

0 votes

Anyone can help me please?

9 Comments

I can't tell what you are solving: some function that you haven't shown here, or some function implied by the rest of the model. If the rest of the model, what parts exactly are to be solved??
Nuno
Nuno on 19 Jul 2011
The problem is only in this part of the model...
Because, first i had implemented this: http://img33.imageshack.us/img33/148/48602148.png
In this case, don't exist any error...
When i implement this, appear the error that i said: http://img577.imageshack.us/img577/3788/modelr.png
You might want to check the output of your current sensor and make sure it doesn't get to (or near to) zero, otherwise you'll be dividing by zero.
Nuno
Nuno on 19 Jul 2011
Yes, the current is zero in large part of the simulation...
how can I make to change this?
That's probably the reason why you have the error. What would you expect when you divide something by zero? You need to manipulate the output of the current sensor to ensure it's never zero (or around zero) before doing the division.
Nuno
Nuno on 19 Jul 2011
If i divide by zero is impossible, yes?
how I'm going to do that is you say?
Yes, you can't divide by zero, or you'll get infinity. That's precisely the problem you're having. You need to figure out a way to transform the output of the current sensor into something that is equal to the current, except when it's around zero. This is a fairly standard technique, using something like PS Switch, PS Product, PS Sign and PS Abs to feed the output of the sensor through when its absolute value is greater than some small threshold, and that threshold (multiplied by the sign of the current) when it's below the threshold.
Nuno
Nuno on 19 Jul 2011
But this part of model simulate a charge...
In the instant that I=0, i can´t put for example I=1A, because in this form energy expended...
How do this?
Remind me again what you are intending to calculate by dividing by the current? If you were doing this with real hardware and your current dropped to those simulated levels, what would you expect the response of your equipment to be ?

Sign in to comment.

Products

Tags

Asked:

on 18 Jul 2011

Community Treasure Hunt

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

Start Hunting!