Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interesting issue with integrator blocks

Status
Not open for further replies.

Rasmoo

Mechanical
Joined
Nov 26, 2013
Messages
2
Location
DK
Hey guys. Here is a short description of the issue:
I an integrating an acceleration twice to get the position of a valve spool. The position integral has an upper and lower limit to simulate the physical limits of the spool motion. However, the velocity integral experiences a kind of 'wind-up' when these position limits are hit, causing the velocity to keep building as long as the calculated acceleration is going in the same direction. When the acceleration then changes sign, the velocity will have to unwind before the spool moves again.

Obviously, the velocity must be reset to 0 and held there until the acceleration changes sign. However, this has proved quite difficult to do with the saturation and reset ports. Does anyone have a good idea of how to do this?

Thank you very much for your help.
 
Try using a Matlab embedded function instead. You can use if statements inside to zero the vel.


"Simplicity is the ultimate sophistication." L. da Vinci
- Gian
 
Thanks for the replies. However, I finally figured out a solution, which is to use the 2nd order integral block, that is apparently made for this situation. Didn't even know that block existed until now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top