My Simulink model will contain (a lot of) n
identical subsystems, each defined by about 30 different predetermined parameters. Currently every time I duplicate a subsystem I need to modify the properties of every single block, consequently a lof of work with error-proneness. So my idea is to store corresponding parameters in a vector as follows:
parametersA = (parameterA1 , parameterA2 , ... , parameterAn);
...
parametersZ = (parameterZ1 , parameterZ2 , ... , parameterZn);
The values in the block properties will then be defined as parametersA(2)
for subsystem #2 and parametersA(n)
for the n-th subsystem. Or imagine every subsystem contains a PID-controller and the proportional gain KP
needs to be defined. So the first subsystem will call KP(1)
and the n-th KP(n)
.
Hence my basic question is: how can I declare my index variable n
within every subsystem, so every single block knows which element of the parameter vector to call?
An additional question would be: is it actually necessary at all to replicate my subsystems or could everything be done in one? Would that affect simulation time?