Need MATLAB code for tuning of multiple PI controllers in Simulink

20 次查看(过去 30 天)
I have a complex Microgrid topology with multiple PI controllers employed for droop control and DC bus voltage control. I need a matlab code to run in order to tune the individual PI controllers present in the system using optimization algorithms (PSO,GA, DE). Steps to implement the same would be highly appreciated. I dont have transfer function based models used in the system thus, everysystem considered is to be considered as an open loop component based system (PV, BESS).
  3 个评论
Sam Chak
Sam Chak 2023-12-5
Isn't it considered a good practice in engineering to first comprehend the desired behavior of a system through nominal mathematical modeling and analysis, and subsequently assemble the components in accordance with specifications (such as saturation limits, rates of change, etc.) that may yield the desired behavior?
I find it perplexing to consider randomly selecting components for constructing a complex Microgrid without a thorough grasp of the mathematical models that describe each component of the Microgrid system. Could this not lead to a potential disaster when the switch is flipped?
For instance, when aspiring to build a supercar capable of reaching a top speed of 300 mph within a minute, it seems imperative to identify an engine that can feasibly generate the required horsepower for achieving the desired top speed. This requires a mathematical modeling of the engine's performance attributes.
Sam Chak
Sam Chak 2023-12-5
Moreover, the process of tuning a controller with the aid of a model is generally acknowledged as being more straightforward to implement compared to tuning a controller in the absence of a model. If, indeed, acquiring the mathematical model poses a genuine challenge, one may resort to techniques such as Model-Free Adaptive Control (MFAC), Iterative Learning Control (ILC), and the contemporary Reinforcement Learning Control (RLC).

请先登录,再进行评论。

采纳的回答

Arkadiy Turevskiy
Arkadiy Turevskiy 2024-1-11
编辑:Arkadiy Turevskiy 2024-1-11
There are a couple of options you could explore.
  1. Tune each inidividual PI controller. You can use closed-loop PID autotuner blockfor this. Theblock will automatically compute system frequency response at a few frequency points and will use that to come up with PI gains. The downside of this approach is that it tunes one PI controller at a time, so if they are coupled, tuning might be tricky.
  2. Another approach is to use optimization methods as you mentioned. For this, you can try Response Optimizer app in Simulink Design Optimization. Specify design requirements for your system response, specify PI gains to tune, and leave it to optimization agorithm to try to tune your gains. Please check out examples here, and documentation here.
HTH
  1 个评论
Jordan Olson
Jordan Olson 2024-1-11
编辑:Jordan Olson 2024-1-11
@Sarthak Mohanty Another option is to use a reinforcement learning agent as the "optimizer" to tune the gains of your controllers. We have an example that shows how you can do this: Tune PI Controller Using Reinforcement Learning

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by