Error using transfer functions
3 次查看(过去 30 天)
显示 更早的评论
Please help me sort out the issue. I am not understanding why the gain block dimension is shown as 2, where as i am expecting only 1. Please see the attached screenshot of simulink blocks.
采纳的回答
Birdman
2017-11-7
It is normal for simulation to run faster if you substract Transfer functions from the model but the main reason it is slow is that there are too many mathematical calculations to be done and too many states coming up from transfer functions and integrators. The variable-step solver tries to automatically adjust the step size for solving the states but since this model is an electrical system and since naturally electrical systems tends to behave quickly, the solver reduces the step size to almost 1e-4 and this results in simulation to slow. I have some suggestions:
-First, try to find the most suitable sampling time for your model. This means discretizing the continuous blocks in a suitable manner(Transfer Functions and Integrators). Because the variable step solver automatically increases the step size(narrows) in order to give you a solution but this results in slow simulation. I suggest you to look for Bode Plots of Transfer functions and controllers in your model.
-Second, be careful with the potential algebraic loops while discretizing the system.
11 个评论
更多回答(1 个)
Shyam
2017-11-30
14 个评论
Ramu Nair R
2017-11-30
编辑:Ramu Nair R
2017-12-1
I installed latest version and opened the model. I am trying to use memory blocks instead of delay block. Also, is it necessary to use z domain for transfer function. The block is a part of a bigger system, which are in continuous time, fixed step and solver is Runge-kutta
Ramu Nair R
2017-12-1
编辑:Ramu Nair R
2017-12-1
It worked. The problem was with initial condition. Thank you very much for your time and effort.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Classical Control Design 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!