continuous integrator vs discrete-time integrator
33 次查看(过去 30 天)
显示 更早的评论
Hello.
I'm trying to convert the simulink model with continuous system to discrete system.
I replaced integrator block with discrete-time integrator block.
However the results showed different values and I can not figure out what is the problem of different results.
In the figure, x1 always return 0 regardless of the input constant.
0 个评论
采纳的回答
Guy Rouleau
2013-7-3
What you observe is expected. Different blocks... different results ;-)
Use Scope blocks to understand the evolution.
As you probably know, the continuous version of this set of equation is marginally stable... which means it will oscillates forever. If you connect a Scope to the continuous version, this is what you will observe.
For the discrete, by defaul, the sample time of the DTI is 1s. This makes the system unstable. By default, the simulation stop time of a model is 10 seconds. With a scope, you will see that after going up and down you are very lucky that the values on your display are 1 and 0. If you simulate a bit longer, you will see that the oscillation slowly diverges.
0 个评论
更多回答(3 个)
Pankaj
2014-2-26
I think you are using forward euler as the integration type in the discrete integrator.
Try using Trapezoidal Integration type in the settings of Discrete Integrator block, you will see same results.
Moreover, this does raise a question of the usage of forward Euler and backward euler integration type? when trying to convert a continuous system to a discrete system.
Please reply if someone has answers?
1 个评论
Radhakrishna Kothamasu
2016-2-3
Yes, I believe so. Euler approximations are to convert a continuous signal flow to discrete one. Each of the Forward, Backword and Traphezoidal methods have it's own advantages and disadvantages. Safe approximation normally is Trapezoidal method. correct me if I am wrong.
Komal Garlapati
2016-4-21
By default, the sample time of discrete time integrator block is 1 second. It will accumulate the data sampled at the intervals of one second. It misses a lot of data, if your step time is low. To get the same results from the discrete integrator and continuous integrator blocks, give the sample time of the discrete time integrator same as the one you mentioned in the Simulation>Model Configuration Parameters>Solver>Relative tolerance.
0 个评论
Janakiraman S
2016-11-8
编辑:Janakiraman S
2016-11-8
THE SCREENSHOT SETTINGS WILL GIVE DISCRETE AND CONTINOUS SIMILAR RESULTS
THE SCREENSHOT SETTINGS WILL GIVE DISCRETE AND CONTINOUS SIMILAR RESULTS
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Visualization 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!