- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Maximum Value
Maximum Value
Maximum Value
Hi, I need a way to determine a maximum value out of several inputs. I looked it up but couldn’t find anything to help me.
For context: I want to implement a passive balancing for several battery cells connected in series with different voltages. When they are being charged, after reaching a certain overall voltage, the cell with the maximum voltage should be discharged while the rest of the cells keeps charging.
I tried to expand on the max Block but apparently this only works with 2 inputs. I thought making my own “SI4SO”-Block might work but it doesn’t. Now I’m kind of lost since I’m a complete beginner to OpenModelica.
Some help would be appreciated.
Also, what would be the best way to import data from excel/csv?
Re: Maximum Value
Modelica.Blocks.Math.MinMax: Output the minimum and the maximum element of the input vector
Dealing with CSV/Excel files is easiest done by converting them to mat-files and using Modelica.Blocks.Tables to read them.
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Maximum Value