Hello,
Is there a ready model for an integrator with anti-windup and reset? The PID compensator model by KSKelvin works flawlessly, but doesn’t have anti-windup…
Thank you very much!
Hello,
Is there a ready model for an integrator with anti-windup and reset? The PID compensator model by KSKelvin works flawlessly, but doesn’t have anti-windup…
Thank you very much!
antiwindup is to limit max and min output from an integrator?
not just limit the output, but also to prevent its internal state from continue integration once it is saturated.
It seems I found a solution: A B-source with the following expression:
V=Ki*idt( if(V(out) < limit_positive && V(out) > limit_negative, V(in), 0), {Vini},{V(reset)} )
where the limits and the initial voltage are given as parameters. It resets if V(reset)>0.5.
Well… is this formula really correct? Or I made a mistake? Here is a comparison of an integrator with zener diode as anti-windup (pid controller - PID - Integrator Anti Windup limit values - Electrical Engineering Stack Exchange). And compare to the formula you provided, with same signal condition.
Integrator-AntiWindup-Opamp.qsch (9.4 KB)
I modified the formula into this. If this is antiwindup and reset, I will make a new symbol for it.
V=Ki*idt( if( (V(out) >= limit_positive & V(in)>0 ) | (V(out) <= limit_negative & V(in)<0), 0, V(in) ), Vini, V(reset) )
Integrator-AntiWindup-Formula.qsch (2.8 KB)
Yes, you are absolutely right, my formula causes the integrator get stuck, while your performs correctly.
Also, could you please advise how to make a symbol that has such a formula, without making a schematic file?
Thank you very much!
Download my General Guide Qspice/Guideline - KSKelvin-Github/Qspice
Goto Section 2A, #5 - Create Subckt Symbol (.qsym) from Hierarchical Circuit (.qsch)
A symbol of integrator with anti-windup based on above formula is upload to
Qspice/Symbols-KSKelvin/control/Integrator-AntiWindup-func.qsym - KSKelvin-Github/Qspice
Integral gain Ki is included, but I made it as an invisible instance parameter.
example.Integrator-AntiWindup-func.qsch (4.2 KB)
Thank you very much!