I created a highly hierarchical model of many instances of referenced subsystems. Let's take this as an example
TopLevelModel
- Referenced Subsystem A - 1
-- PI Controller
- Referenced Subsystem A - 2
-- PI Controller
- Referenced Subsystem B
-- Referenced Subsystem A - 1
--- PI Controller
The model has tuning parameters (P & I Gains for the controllers) and design parameters (e.g. oscillator frequency). Perhaps, Simulink doesn't differentiate between these two, and that's fine. But I'd like to be able to quickly load (separately) sets of tuning parameters (agressive, weak) and design parameters (PurchaseOptionA, PurchaseOptionB).
Data dictionaries looks like the way to go and I read all of the documentation on "Manage Design Data" and "Configure Signals, States and Parameters", but I'm unclear on how I can wire up the nested PI control pameters to the top level. Let's say I use a data dictionary for each PI controller, then I'd have three structures of parameters like this?
A_Instance1.Ki = 1
A_Instance1.Kp = 2
A_Instance2.Ki = 3
A_Instance2.Kp = 2
B_Instance.A_Instance1.Ki = 0.5
B_instance.A_Instance1.Kp = 4
Is there no way I can just name the variables Kp and Ki in each dictionary and have the name auto deduced from the way the data dictionaries are linked? I have to put the full "path" into each referenced dictionary? What if I want to use those parameters in a different model with a different hierarchy? Is that possible without having to match the exact parameter naming?
Maybe I'm also getting the entire workflow wrong.
0 Comments
Sign in to comment.