Skip to content

Conversation

@noguchi-takahiro
Copy link
Contributor

@noguchi-takahiro noguchi-takahiro commented Aug 14, 2023

This is to close #142.

I made a draft of an integrator anti-windup section in docs.AMDC, especially control-with-amdc.

The article draft is available anti-windup_draft.pdf and source of the article is here.

The contents include:

  • How to think about performance of anti-windup
  • Different methods
    • clamping(continuous)
    • clamping(discrete-time)
    • back-tracking(continuous)
    • back-tracking(discrete-time)

Please review this and feel free to give me feedback. Major and minor changes or proofreading are welcome.

Copy link
Contributor

@elsevers elsevers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @noguchi-takahiro! Nice job -- and I can see a lot of work went into this. I compared notes with @npetersen2 and typed up some feedback on your article here. Our consensus is that this is close, but we want to adjust the perspective a bit, which will have you remove some content and then adjust your structure.

Feedback:

  1. Framing the article: The main purpose is explaining to people that you need to simulate realistic scenarios of windup and antiwindup performance because there is not a perfect solution. It depends on how long you are in windup, how extreme it is, etc.
    • Can’t really have perfect anti-windup, need to have simulations to investigate specific scenarios that you expect to encounter
  2. Pick an abstract, simple first order plant to use as an example as you develop the techniques
    • Plant: 1/(s+1), Controller: PI (kp + ki/s) (pick a tuning to give a first order response with a bandwidth of 10 Hz).
    • Comment on how this example could be viewed as a voltage (input) and current (output) for an RL load, torque (input) and speed (output), or heat (input) and temperature (output)
  3. It is nice that you show a universal block diagram, with an anti-windup block that gets populated with different contents for clamping and back stepping. Let's have you revise those clamping and back stepping diagrams to make it more clear that they are showing the contents of this block. We suggest to put a box around these with input and output ports clearly labeled that match your universal diagram image
  4. Only discuss and develop continuous time techniques. We will plan to add the discrete time implementation later, as part Application articles, such as the planned discrete time CVCR article.
  5. As the article progresses, take the following structure:
    1. demonstrate the PI controller and plant with no anti-windup and show the types issues of issues that an engineer will encounter
      • discuss and show example with both command and disturbance induced anti-windup
    2. Then introduce a simple version of clamping that simply stops integrating when preSat != postSat.
      • Show plots with multiple traces: original and simple clamped response, again for both command and disturbance induced anti-windup
    3. Then introduce an advanced version of clamping (the block diagram and description that you currently are showing).
      • Show plots with multiple traces: original, simple clamped response, advanced clamped
      • Make sure you have a case in your example that showcases the advanced version working better and comment on that (this needs to be sufficiently compelling to motivate your reader to go through the effort to implement the more advanced version)
    4. Then introduce back stepping
      • Show plots with multiple traces: original, advanced clamped response, back stepping
      • Discuss how you pick Kb. The choice of picking Kb is very nuanced and depends on the type of event that you are handling. If you make a poor choice for Kb, clamping will actually be better.
        • This article should help the reader understand this nuance and that in some cases clamping is a better choice.
        • Show a results plot for where you come up with a Kb value that works really well for the example system + command tracking/disturbances. Now, keep the same plant and same controller and Kb value, but change your command or disturbances so that the backtracking now yields inferior results as compared to clamping.

Thanks @noguchi-takahiro!! I'm happy to set up a meeting to discuss if that would be helpful.

@elsevers elsevers changed the title Add an Integrator Anti-Windup into docs.AMDC. Add Integrator Anti-Windup Article Mar 25, 2024
@noguchi-takahiro
Copy link
Contributor Author

Thank you for your feedback @elsevers @npetersen2 . I have a question about item 5,

discuss and show example with both command and disturbance induced anti-windup

Does the disturbance here mean that I need to add the disturbance voltage between the controller and plant?

@elsevers
Copy link
Contributor

Thank you for your feedback @elsevers @npetersen2 . I have a question about item 5,

discuss and show example with both command and disturbance induced anti-windup

Does the disturbance here mean that I need to add the disturbance voltage between the controller and plant?

The answer is yes, but this brings up an important point. So it is confusing when you think about this in terms of current regulation, right? Like... why is there a disturbance voltage? What is the physical basis for this?

This is part of the reason for point 2:

Pick an abstract, simple first order plant to use as an example as you develop the techniques
...
Comment on how this example could be viewed as a voltage (input) and current (output) for an RL load, torque (input) and speed (output), or heat (input) and temperature (output)

So we're thinking you should just have this be an abstract first order system, that you occasionally relate back to a real system. If this first order system represents torque and speed, you can more easily imagine how you'd have a torque disturbance from your load, right?

@noguchi-takahiro
Copy link
Contributor Author

Thank you @elsevers. I am trying to make the abstract, simple Simulink model based your comment. I have some updates and question about the item 2 and the simulation results.

  1. Pick an abstract, simple first order plant to use as an example as you develop the techniques
    Plant: 1/(s+1), Controller: PI (kp + ki/s) (pick a tuning to give a first order response with a bandwidth of 10 Hz).

Here is the updated Simulink model that demonstrates the simple example;
image

The plant model has a transfer function of $G_p =1/(s+1)$, and the PI controller is tuned as $K_P=\omega_b$ and $K_I=\omega_b$, where $\omega_b=2 \pi \times10$. For now, I am implementing the simple version of clamping as the anti-windup method, where the saturation values are set as $\pm 10$.

Here are results of the responses.

1.) Without anti-windup
image

2.) With anti-windup
image

where the command is set as 1 at the time of 0.2 sec. You can see the overshoot is improved in the case of the with anti-windup. I think these results are reasonable for me.

Next, I wanted to try inject the disturbance of a pulse to see what would happen. The disturbance pulse has the amplitude of 1 during 0.1 second as shown in the figure below.

image

where the command is set as 0 for this simulation. Note that the simple clamping is activated in this simulation. However, the anti-windup is not so effective this time as the manipulated value is no longer saturated. If we want to see the effectiveness of the anti-windup with the disturbance, could I just increase the disturbance so that the windup occurs? Is there any robust simulation scenario that can help determine the relationship between disturbance and anti-windup?

Or is this the right way that I should take here in the first place?

@elsevers
Copy link
Contributor

elsevers commented Apr 4, 2024

Thanks @noguchi-takahiro. It looks like you are on the right track here. In regards to your question, I think you do want to increase your disturbance so that your regulator saturates.

@npetersen2, please chime in if you have further thoughts on this.

@npetersen2
Copy link

Nice work @noguchi-takahiro

For the disturbance-induced wind-up, I believe the disturbance input must be larger than the saturation value of the actuator to see any issue. So, since you saturated to $\pm 10$, you should try applying $>10$ disturbance, e.g., 15.

Think of this like a position regulation system where you are commanding a force and the state you are regulating is position. The saturation is on the force you can create (e.g., due to current limits or thermal limits, etc). For example, +/- 10 N. But then a user applies a 15 N disturbance with a hammer. You cannot regulate the position during this transient since it saturates, however, we are interested to see the transient response when the disturbance ends.

@noguchi-takahiro
Copy link
Contributor Author

noguchi-takahiro commented Apr 8, 2024

Thank you your comments @elsevers and @npetersen2!

I got two questions this time about the item 5-iii and 5-iv

addressing item 5-iii

image

As I understand, I need to come up with a simulation scenario in which the advanced clamping produces a better result. Here is an example simulation I implemented this time, where the command of 1 is issued at 0.2 sec, and of -4 is issued at 1 sec.

image

The figures below are expanded versions around the time 0.2 and 1.5 sec, respectively.
(a) 0.2 sec

image

(b) 1.5 sec

image

It looks like the simple clamping (blue) and the advanced clamping (dashed cyan) are a complete match. But we want to separate them, i.e., get the advanced clamping better...

When the process of the advanced clamping was done, the integration was stopped only if BOTH conditions below were satisfied.

  1. The preSat (= controller output) is saturated
  2. The sign of error and the preSat are not equal

I think if condition 1 is satisfied and the I-controller stops the integration, it is equivalent to simple clamping. So, I needed to come up with a situation that satisfies condition 2 to compare the simple and the advanced clamping. My question is, when are the sign of error and the present not equal? I tried several scenarios, changing the command waveforms, but these methods were equal, i.e., I could not find a nice scenario and compare them. For your information, I referred to this advanced clamping method from these resources:

image

addressing item 5-iv

image

This is similar to the previous question, but how can we come up with the scenario that the clamping method is better than the back-tracking by just modifying the command/disturbance? If I command the issue of 1 at 0.2 sec, it looks like the back-tracking method is better than clamping (see the previous results), whereas if I inject the disturbance of 15 for 0.1 sec, the clamping is better around the transient response, as shown below. I guess this is not always true, depending on the back-tracking gain of $K_b$, but how can we make these phenomena more compelling? Notice that $K_b=K_I/K_P=1$.

image

image

I would be glad if you could give me your thought here.

@npetersen2
Copy link

Good discussion and thoughts @noguchi-takahiro , interesting.

I have a feeling that the scenario which will help show the differences in these methods for anti-windup is a "fast" transient from positive windup, to negative windup, back to positive. Let me give an example:

Imagine a position tracking system holding the position to 0. The max control effort is saturated to 10. Then, a user applies a +15 disturbance for 1 second, then immediately applies a -15 disturbance for 0.5 sec, then back to +15, then 0. I think this "slamming" of the system will help show the differences in the anti-windup approaches.

What do you think?

@noguchi-takahiro
Copy link
Contributor Author

Thank you for your feedback @npetersen2 @elsevers .

I am still trying to address your comment, but could you check if my Simulink model is properly implemented when you have a time?

I temporary added the MATLAB script main.m to run the Simulink file.

@npetersen2
Copy link

Thanks @noguchi-takahiro , I will try to take a look at this soon.

@npetersen2
Copy link

Also, a very interesting approach for anti-wind-up is presented in this article: https://ieeexplore.ieee.org/document/8279496

I do not suggest you add this to your article right now, but eventually, it would be nice to explore this approach and use it. It looks quite nice and useful!

@npetersen2
Copy link

Hey @noguchi-takahiro , I see this Simulink model was created in R2023b.

Unfortunately, I only have R2023a installed... would you be able to open your model and save-as R2023a format? Then I can easily take a look

@noguchi-takahiro
Copy link
Contributor Author

Thank you @npetersen2. I hope the Simulink model was saved as the earlier version R2023a. Could you check if this simple_model.slx is combatable with R2023a?

@npetersen2
Copy link

I am commenting here to archive some Slack conversations I have had with @noguchi-takahiro about this:


I have been investigating the anti-windup methods via your simulation, specifically the "advanced" and the "simple" clamping methods

I believe you found they behaved the same way... so no reason to use the advanced method when the simple method works well

I finally managed to find a contrived example when they do NOT behave the same, where I believe the advanced method works better

image

  • In the beginning, there is a large disturbance which causes the system to saturate, and it steady-states at -1 output....
  • Then, at 5 sec, the controller set point starts toggling around this disturbance driven output point

the first time the controller set point goes below the output point, it triggers the advanced method to NOT clamp the integrator, while the simple method stays clamped. This causes the advanced method to un-windup in a good way, where the simple one cannot. So, from this point onward, the advanced method behaves better

HOWEVER

this only occurs if the Kp gain is basically not present... i.e. really small.

for typical Kp tuning, at this instance in the simulation, the proportional control output causes the output to drop out of saturation, which causes there to be no differences in the advanced vs simple methods

so, my summary:

  • the advanced method does actually make sense and is logical
  • however, for our typical systems, it is quite unlikely to ever actually result in different behavior compared to the simple method
  • the only case of difference is when: we are in saturation AND the control output would be driving us out of saturation (i.e. signs are different from error vs control output preset),
    -this is quite rare, since in this case, usually the difference in signs immediately moves us OUT of saturation
    • so, for this to matter, we need an example where we can stay in saturation during this flip in signs
    • so far, i can only find an example of this by basically removing the Kp gain

if you run this, it should output the figure above: sim_files.zip

@elsevers
Copy link
Contributor

elsevers commented Jun 4, 2024

Thanks @npetersen2 and @noguchi-takahiro, I am wondering what the next steps on the advanced vs simple clamping method.

The current request we have from here is:

  1. Then introduce an advanced version of clamping (the block diagram and description that you currently are showing).
    • Show plots with multiple traces: original, simple clamped response, advanced clamped
    • Make sure you have a case in your example that showcases the advanced version working better and comment on that (this needs to be sufficiently compelling to motivate your reader to go through the effort to implement the more advanced version)

I suggest that we modify this plan slightly to be as follows:

  1. Then introduce an advanced version of clamping (the block diagram and description that you currently are showing).
    • First, show that for the baseline case study (what you used to introduce simple clamping, 10 Hz controller tuning, etc.), the simple and advanced clamping perform the same (i.e, show plots with multiple traces: original, simple clamped response, advanced clamped)
    • Next introduce a case where the advanced clamping performs better (can be alternate control tuning + command, like what @npetersen2 and you show in the comment above). Comment on what type of criteria are needed to see any benefit from the advanced clamping and that for most practical motor drive cases, this benefit is unlikely to be observed and therefore the effort to implement the more advanced clamping version is probably not worth it.
    • Provide the Simulink models for each of these case studies so that readers can download and try it out for themselves

@noguchi-takahiro
Copy link
Contributor Author

Thank you @mhmokhtarabadi for your helpful feedback. I addressed your feedback and modify the article entirely. Could you review this article thoroughly and share your thought?

@noguchi-takahiro noguchi-takahiro linked an issue Oct 24, 2025 that may be closed by this pull request
Copy link
Contributor

@Daehoon-Sung Daehoon-Sung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Are all files under 300 kB (if not, please carefully assess whether it is worth committing them)? Yes
  2. Are all files named according to the appropriate naming convention, i.e., dash-case, camelCase, snake case? Yes
  3. Do all Markdown files follow the CONTRIBUTING article template? Yes
  4. Do all links work in the material that the PR is adding? Yes
  5. Is the PR configured to close the correct issue(s)? Yes
  6. Did the PR fully address the Approach section of the issue(s) it is closing? Yes

Please work on addressing any No items.

@Daehoon-Sung
Copy link
Contributor

Daehoon-Sung commented Nov 4, 2025

Hello @noguchi-takahiro. I reviewed and approved this PR. Please note that I edited the Approach section to close the related issue. Thanks. Could you review this Professor @elsevers ?

@mohamed-dek1
Copy link
Contributor

@elsevers can you review this PR?

@Daehoon-Sung
Copy link
Contributor

Hello, Professoe @elsevers, @noguchi-takahiro, @mhmokhtarabadi. Can we sync up together during today's office hour, after the lab hour, to complete this article?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add article of anti-windup

7 participants