Control of RMS with PID
Show older comments
Hi. I prepared the following structure to keep the RMS value of my signal constant at 1.02. However, this diagram gives the error given below:

Compilation of model 'sim_model' failed while trying to resolve underspecified signal dimensions.
Caused by:
Unable to determine signal dimensions. There is a loop consisting of 'sim_model/PID/Sum/Sum_PID/Sum' that cannot be resolved because signal dimensions are defined by a cyclic relationship. Specifying the signal dimensions on Inport, Mux, Selector, Demuxes will help resolve signal dimensions in the loop. You can also use the Signal Specifications to define the signal dimensions.
When i use two RMS blocks, the following diagram can work:

Where is my mistake here? Or, is my idea completely wrong?
Thank you,
Note: I have not yet worked on PID tuning.
2 Comments
Mathieu NOE
on 16 Jun 2025
Edited: Mathieu NOE
on 16 Jun 2025
hello
the first diagram contain a loop , and as it happens quite often this creates issue if you don't use one of these solutions to avoid algebraic loops
the second idgram has no loop => no issue
I understand your idea of keeping the rms constant but NB that a "Moving RMS" will add some delay in your "process" so be gentle on the PID gains . Anyway , I suppose that the idea is not to maintain rms on every samples but more like a genral trend (with some fluctuation) ?
Volcano
on 21 Jun 2025
Accepted Answer
More Answers (0)
Categories
Find more on Continuous in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!