Why is during intgration of velocity signal in simulink exhibits drift in position signal ?
9 次查看(过去 30 天)
显示 更早的评论
I have an input signal which is velocity v(t). Normally when you want the position signal x(t) then you can use the integrator block in simulink and it gives you the position signal. When i do this i got a position signal but it looks like it is drifting in time. Does someone have an explanation for this phenomena??
0 个评论
回答(2 个)
Jim Riggs
2018-7-2
编辑:Jim Riggs
2018-7-2
If you have two different simulation of the same thing that show different results, it is clearly an indication of an implementation difference. You should check your integrator implementation to see if it is an inherently inaccurate one (e.g. Euler integration). Is the integrator a fixed-step or variable step integrator? If variable step, how is the error controlled? These are all fundamental parameters which will significantly effect the numerical accuracy.
Looking at the integrator is just the first step. What about the over-all simulation time step and the other models in the two simulations? How do they compare/differ?
0 个评论
Captain Karnage
2023-5-19
This is an old question, and I can't say for sure without seeing your exact Simulink model, but here is a potential answer. When you take the integral, you lose your initial conditions. The simplest example of this is a line. Standard x,y equation for a line is
y = mx + b
if you take dx/dy, you just get m. When you integrate that, now you get mx. You've lost the b. The b is your initial condition.
A way to overcome this is that the integral block can add a port for initial conditions. Go to the block paramters, then "initial condition source" and select "external".
Then connect your original position signal with the initial condition port that appears.
If you're still seeing some drift, another option is to add an external reset as well (the line above the initial condition source). Then you have to determine what is the best reset signal - usually it's a zero crossing but it could be something else depending on your specific system. Then each time it is reset, it will also reset the initial conditions to whatever is connected.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 General Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!