MATLAB: How to customize a Built-in PID Block

built-in blockControl System Toolboxmasked subsystempidsimulink

I am using a PID controller in a feedback system. I need to change the gain's multiplication type from element-wise to the matrix. I right clicked on the PID block then from link options, I disabled the link. Now after I looked under the mask, I could change the Gain's multiplication type. but after I save the model and run the simulation again everything goes back to its initial settings like I never applied any change! So my question is How can I customize the PID block in SIMULINK?

Best Answer

Hello Mike,
At the moment, you won't be able to customize the standard PID block and still retain the automatic tuning functionality. The best workaround I can suggest is creating your own block for implementation, and using the standard block for tuning. Once the gain are tuned using the standard block, you can use them in your customized block. You could probably somewhat automate the process by using block callbacks and variants.
Arkadiy