0

I have a li-on cell model on simscape. I takes

  • Instant Voltage Value [Voltage]
  • Full Capacity [Amper Second]
  • Initial SOC[%] as input and have outputs:
  • Cout : Remaining Capacity [Amper second]
  • SOC : Remaining SOC [%]
  • "+" and "-" Simscape Electrical Terminal

It works when I connect them in series but when I connect them in parallel it gives me error depicted below. Wat may be the reason? How can I solve that?

Thanks.

enter image description here

component v_ysk 

inputs     
    v_ins = {0,'1'};
    c_full = {0, 'A*s'};
    c_initial = {0,'A*s'};
end
outputs
    c_out ={0,'A*s'};
    soc = {0,'1'};
end

nodes
    p=foundation.electrical.electrical % +:right
    n=foundation.electrical.electrical % -:right
    
   
end



parameters (Size =variable)
    
    
end

variables(Access=private)
    i = { 0, 'A' }; 
    v = { 0 ,'V'};



end
branches
    i : p.i -> n.i;
end

equations
    


    
  

  c_out == c_initial + integ(i);
  v == p.v - n.v;
  soc == (c_out/c_full)*100;
  
  if (c_out>0 && c_out<= c_full)
     v == {v_ins,'V'};         
  else 
     v == {v_ins , 'V'};
  end

end

end

1 Answers1

0

Here integ is the source of the problem. Instead of integ, I have used .der which is actually same.