Why Integrator with Wrapped State don't wrap the lower limit? (R2018b)
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
On simulink we have a block called "Integrator with Wrapped State". This behavior looks pretty simple. This image (from the help doc) show whats the expected output (depicted by "Wrapped state integrator"):
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/281493/image.png)
In the parameters configuration, I set the values as follow:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/281494/image.png)
Hence, I expected a output between 0 and 4. However, I got this output:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/281495/image.png)
Why Integrator with Wrapped State don't wrap the lower(=0) limit?
0 Kommentare
Antworten (1)
Fangjun Jiang
am 2 Apr. 2020
It should not be like that. Create a simple new model to verify it. Grab a Sine Wave block, change the amplitude to be 3, Connect it to the Wrapped State block, change the upper value to be 4 and sample time to be 0, run simulation for 20 seconds, you should see it limits at both ends.
4 Kommentare
Fangjun Jiang
am 3 Apr. 2020
Not sure about the issue wrt frame-based. You can contact the Mathworks tech support online from your Mathworks account, or call them up.
- Your reset value is valid only when lower value is 0. Thinking of an example when upper is 5 and lower is 3.
- The same block in R2019b seems to have fixed the problem. It contains the OR logic you implemented and a different way for reset value.
Siehe auch
Kategorien
Mehr zu General Applications finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!