From b1731ad936a39976f081c811e8a549cca3308bbd Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Wed, 15 Mar 2023 14:33:42 +0100 Subject: [PATCH] Add figure to PID_Controller example --- Modelica/Blocks/package.mo | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Modelica/Blocks/package.mo b/Modelica/Blocks/package.mo index d297b7a490..8e60a9b879 100644 --- a/Modelica/Blocks/package.mo +++ b/Modelica/Blocks/package.mo @@ -155,7 +155,10 @@ works reasonably, since the input to the limiter (PI.limiter.u) is forced back to its limit after a transient phase.

-")); +", figures = {Figure(title = "Anti-windup compensation", identifier = "anti-windup", preferred = true, plots = {Plot(title = "Reference tracking", identifier = "tracking", curves = {Curve(y = integrator.y, legend = "Reference speed"), Curve(y = inertia1.w, legend = "Actual speed")}), Plot(title = "Anti-windup limiter", identifier = "limiter", curves = {Curve(y = PI.limiter.u, legend = "Input to the anti-windup limiter "), Curve(y = PI.y, legend = "Controller output")})}, caption = "%(plot:tracking) Reference speed (%(variable:integrator.y)) and the actual speed (%(variable:inertia1.w)). The system initializes in steady state, since no transients are present. The inertia follows the reference speed quite good until the end of the constant speed phase. Then there is a deviation. + +%(plot:limiter) Here the reason for the deviation can be seen: The output of the controller (%(variable:PI.y)) is in its limits. The anti-windup compensation works reasonably, since the input to the limiter (%(variable:PI.limiter.u)) is forced back to its limit after a transient phase. +")})); end PID_Controller; model Filter "Demonstrates the Continuous.Filter block with various options"