How to solve the Data Type Mismatch error in Active cell balancing
15 ビュー (過去 30 日間)
古いコメントを表示
I've developed an Active cell balancing model. The model and scripting file as no error, but while running the simulation, im getting data type error like this
An error ocurred while propagating data type 'Double'. I even attached the model. Can anyone say solution to my data type mismatch error.
0 件のコメント
採用された回答
Anthony Coadou
2023 年 1 月 3 日
Hello,
The problem is the size mismatch on port PWM. The block reads:
if SOC2<SOC1
s1=PWM;
s2=0;
elseif SOC1<SOC2
s1=0;
s2=PWM;
where s1 and s2 are alternatively assigned values of size 1 (scalar 0) and 2 (vector PWM). The MATLAB Function block tries to infer its output data types first, but fails to do so because of the type mismatch, and throws this cryptic error.
Hope that helps.
Anthony
3 件のコメント
Fatma GÜZEL
2023 年 4 月 17 日
Hi sir,
Were you able to make any progress on the last subject you wanted to do?
I'm working on the same issue, I'd be glad if you could help.
There is no problem in controlling with PWM, but I still get a double error when I try to control it with PID.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Naming Conventions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!