Solver settings in Matlab - HVBMSSCTBUN

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Solver settings in Matlab - HVBMSSCTBUN

Jump to solution
189 Views
ShivaB
Contributor III

Hi,

We are using HVBMS800SCTBUN and successfully flashed the demo model (k358bmu_read_s32ct).

What are the solver settings which are to be set ? I see default setting but my models use fixedstepdiscrete with a fixed step time (0.01).Can I use the same setting as well and is it supported ? 

 

 

0 Kudos
Reply
1 Solution
39 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @ShivaB,

Regarding the sampling time, you must take into account that reading from the battery cell controllers takes time, because you typically start the conversion, wait until it is performed, and then read the results from the battery cell controllers. And also, adding your algorithm on top of that, it might easily exceed the 0.01 seconds. To understand exactly how long it takes to your algorithm on the MCU, you need to profile the execution of that piece of code - in MBDT we do provide a profiler block with tells how long it takes to a subsystem containing that block to be executed - and understand how much you have for the communications with the BCCs. Based on this calculus you can optimize the communication.

So what you can do to reach the desired rate for your algorithm, is to organize the communication with the BCCs so that this process is divided across multiple steps; basically you optimize the communication process with the battery cell controllers, so that you use the time in which the application waits fort the BCC conversions to execute the algorithm.

What you can do is to set the desired rate, but execute the communication with the BCCs at a different rate, of course multiple of the desired rate. But here you must take into account that the communication process will exceed the desired rate, and you will loose some steps dedicated for the algorithm.  A better way would be to apply a round robin mechanism for reading the battery cell controllers so at each step in time you read the values from a single BCC. But we get back to the profiling step: is there enough time for a reading and algorithm execution in a single step? Another option would be to use a global conversion command, at the step T, and then at T+1 read the results from the BCC CID 1 and so on for the remaining BCCs. There is no standard communication time, because this depends on your communication speed rate, how many values you request from the BCCs, etc.

As a conclusion, I cannot recommend the solver settings you shall use, because this depends firstly on the algorithm you are trying to run on the MCU, and secondly, on the desired communication with the battery cell controller: how many BCCs are, how many messages are exchanged with the BCCs, how many register values and so on. The steps here are the ones mentioned above: you need to profile the application, and then to start optimize the communication rate. 

Lastly, this community space is maintained by developers on our best effort. We read the threads periodically, but sometimes our answers are delayed due to our daily routines.

Hopes this helps,

Marius

View solution in original post

0 Kudos
Reply
4 Replies
40 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @ShivaB,

Regarding the sampling time, you must take into account that reading from the battery cell controllers takes time, because you typically start the conversion, wait until it is performed, and then read the results from the battery cell controllers. And also, adding your algorithm on top of that, it might easily exceed the 0.01 seconds. To understand exactly how long it takes to your algorithm on the MCU, you need to profile the execution of that piece of code - in MBDT we do provide a profiler block with tells how long it takes to a subsystem containing that block to be executed - and understand how much you have for the communications with the BCCs. Based on this calculus you can optimize the communication.

So what you can do to reach the desired rate for your algorithm, is to organize the communication with the BCCs so that this process is divided across multiple steps; basically you optimize the communication process with the battery cell controllers, so that you use the time in which the application waits fort the BCC conversions to execute the algorithm.

What you can do is to set the desired rate, but execute the communication with the BCCs at a different rate, of course multiple of the desired rate. But here you must take into account that the communication process will exceed the desired rate, and you will loose some steps dedicated for the algorithm.  A better way would be to apply a round robin mechanism for reading the battery cell controllers so at each step in time you read the values from a single BCC. But we get back to the profiling step: is there enough time for a reading and algorithm execution in a single step? Another option would be to use a global conversion command, at the step T, and then at T+1 read the results from the BCC CID 1 and so on for the remaining BCCs. There is no standard communication time, because this depends on your communication speed rate, how many values you request from the BCCs, etc.

As a conclusion, I cannot recommend the solver settings you shall use, because this depends firstly on the algorithm you are trying to run on the MCU, and secondly, on the desired communication with the battery cell controller: how many BCCs are, how many messages are exchanged with the BCCs, how many register values and so on. The steps here are the ones mentioned above: you need to profile the application, and then to start optimize the communication rate. 

Lastly, this community space is maintained by developers on our best effort. We read the threads periodically, but sometimes our answers are delayed due to our daily routines.

Hopes this helps,

Marius

0 Kudos
Reply
75 Views
ShivaB
Contributor III
0 Kudos
Reply
123 Views
ShivaB
Contributor III

@Irina_Costachescu @dragostoma @FlorinCiuca 

I am using HVBMS 800V reference design from NXP. I tried to read the voltages , calculate min and max values and then publish on CAN .However, I see the voltages are always fluctuating . When I tried to find the root cause, I see that the NXP which sends the values from the below block is actually varying. Also we are using demo model shared by NXP . Kindly help how this fluctuation can be reduced. We see that on emulator , we set 2.7 for all sliders .However, i see voltage from 0 to 5V fluctuating or oscillating.

 

Note : We are using 18cell emulator with HVBMS800SCT KIT.

ShivaB_0-1732059498042.png

 

 

0 Kudos
Reply
86 Views
ShivaB
Contributor III

@mariuslucianan Please help on this if possible ...we are using reference model by Nxp but when we are calculating min and max values for cell array voltages and transmitting the data over CAN, I see voltages are fluctuating. I am setting all voltages as 2.7 in 18 cell emulator but see them varying from 0 to 5V 

Tags (1)
0 Kudos
Reply