Clear Filters
Clear Filters

Where is the error?

2 views (last 30 days)
Nuno
Nuno on 1 Jul 2011
Hi... I have the model that i show in the image: http://img51.imageshack.us/img51/5766/modelkq.png
I need that, after i know the value of SOC have:
if SOC > 0.95
g=0;
else
g=1;
end
In other words, if SOC>0.95 the battery don´t charged else the battery charged, but in this case the battery charged always. What is my error?

Answers (2)

Paulo Silva
Paulo Silva on 1 Jul 2011
Just guessing:
  1. g should be a logic value
  2. SOC is a vector
  3. SOC changes very quickly
  4. Put the SOC value in a scope and see if it's what you expect
  5. Put the g value in a scope and see if it's what you expect
  5 Comments
Paulo Silva
Paulo Silva on 1 Jul 2011
just to be sure it never changes value
Nuno
Nuno on 1 Jul 2011
Sorry again... how i scope g?

Sign in to comment.


Nuno
Nuno on 4 Jul 2011
I already see, and the block control works successfully... How i know that Switch are openned or closed?

Categories

Find more on Energy Storage in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!