Simulink simulation error. Conflict with 2 different dimensons

I have created a battery system. The battery itself was created using the 'Battery Builder' app. I have now simulated the whole thing and I get the following error message.
The input signal to 'Input Port 2' of subsystem 'untitled/SOC Estimator (Adaptive Kalman Filter)' has a size of 360 for dimension 1. Given the partition width 1 and the partition offset 0 for this input, subsystem 'untitled/SOC Estimator (Adaptive Kalman Filter)' requires 360 iterations. This requirement conflicts with 1, the number of iterations expected by another input/output signal of this subsystem.
Error in port widths or dimensions. 'Output Port 1' of 'untitled/SOC Estimator (Adaptive Kalman Filter)/CellVoltage' is a [360x1] matrix.
Does anyone have an idea how I can solve the problem with the different dimensions without affecting the mathematical calculations?

Answers (1)

Double click the "For Each" block and check the mark for partition for input "Current". All other inputs are partitioned but not the "Current" input. It looks it should be partitioned.

6 Comments

Although it did not solve the actual problem, thank you for the hint. I had overlooked that :)
Okay, now I can guess that the block with the "SOC" as the first output is the 'SOC Estimator (Adaptive Kalman Filter)' block. Its iteration shows as 1. It seems that should be 360. This should resolve your posted error message. But the one in my answer also needs to be done. Otherwise, there would be a similar error.
You are right, it is the SOC Estimator (Adaptive Kalman Filter). Maybe the pictures were a bit confusing. I have changed the dimension of the SOC Estimator to match the signal size. However, I am now getting an error message that the size conflicts with another block (lower level of the SOC Estimator). Is there not a way to adjust the size of the signal to the SOC Estimator without changing its value in any way?
All other blocks (like the Jacobian) of the SOC Estimator expect a 1x1 dimension
Error message: Error:Invalid input dimensions specified for input port <U> of 'untitled/SOC Estimator (Adaptive Kalman Filter)/Kalman Filter/EKF/Jacobian/Assignment'. The specified dimensions, [360x1], do not match the expected dimensions, [1x1]
The setting of the Assignment block is somewhat tricky. Ask a separate question and show the snapshot of that part of the model, also explain what you want to acheive with that block.
"I apologize for the late response, but I was occupied with other matters. In case you're interested, I resolved my issue over the weekend. Initially, I had to enable the partition in the 'For Each' block of the SOC Estimator (as you've said). Then, in the settings of the SOC Estimator, I had to check the box next to 'Specify current input as cell current(s)'. Lastly, I overlooked an important detail. I had set the constant for 'InitialSOC' to 0.8 only for experimental purposes. The problem arose because 'InitialSOC' became a scalar, while the other two inputs, 'CellVoltage' and 'CellTemperature,' were vectors. For the SOC Estimator to function correctly, all three inputs must have the same size. In my case, I had to convert the scalar 0.8 into a vector."
Thank you for your support :)
hii, can you help i have a similar problem with my model.
this is the error i got:
Error:The input signal to 'Input Port 1' of subsystem 'stone/SOC Estimator (Kalman Filter)' has a size of 160 for dimension 1. Given the partition width 1 and the partition offset 0 for this input, subsystem 'stone/SOC Estimator (Kalman Filter)' requires 160 iterations. This requirement conflicts with 1, the number of iterations expected by another input/output signal of this subsystem.
Error:Error in port widths or dimensions. 'Output Port 1' of 'stone/SOC Estimator (Kalman Filter)/Current' is a [160x1] matrix.
please contact me on my email if i am not able to get back: oceans.rohan@gmail.com

Sign in to comment.

Products

Release

R2023b

Asked:

on 22 Nov 2023

Commented:

on 2 Jan 2024

Community Treasure Hunt

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

Start Hunting!