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.

7 件のコメント

Birdman
Birdman 2017 年 11 月 7 日
Please share the simulink model(export to r2017a)?
Shyam
Shyam 2017 年 11 月 7 日
編集済み: Shyam 2017 年 11 月 7 日
I am using R2016b. Please let me know how to export. I have included screenshot of full model and the error message.
Birdman
Birdman 2017 年 11 月 7 日
You do not have to export then. Just send.
Shyam
Shyam 2017 年 11 月 7 日
I have uploaded.
Birdman
Birdman 2017 年 11 月 7 日
I am not getting any error in simulation, but it is running very slow.
Shyam
Shyam 2017 年 11 月 7 日
I get these errors, included in attached screenshot.
Shyam
Shyam 2017 年 11 月 7 日
編集済み: Shyam 2017 年 11 月 7 日
Hi, errors are no longer there. I just closed and opened the model. But, as you said, it is running very slow. Any idea, why...? It runs normally if the compensator blocks are not there (2 transfer functions and 1 gain block), which adds to the summer

サインインしてコメントする。

 採用された回答

Birdman
Birdman 2017 年 11 月 7 日

0 投票

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 件のコメント

Shyam
Shyam 2017 年 11 月 7 日
Thank you, let me try.
Birdman
Birdman 2017 年 11 月 7 日
Ok, let me know the results.
Shyam
Shyam 2017 年 11 月 7 日
Could you please help me run this simulation.
Birdman
Birdman 2017 年 11 月 7 日
What are your controller parameters, J, B, Jem and Bem?
Shyam
Shyam 2017 年 11 月 8 日
I have uploaded the init file.
Birdman
Birdman 2017 年 11 月 8 日
Firstly, how did you select your Kp and Ki parameters? They were not realistic and eventually I had to decrease them. The reason that it gives error for their initial values is that your control signal rises so quickly that the solver step size can not adapt to its quickness no matter how it tightens the step size. Therefore, one solution would be to decrease the controller parameters. I dropped Ki to 70 and Kp to 5. Still, there is an unstable response, which you need to check out. You may resdesign your controller. Please do not pick the controller parameters randomly. Hope this helps.
Shyam
Shyam 2017 年 11 月 8 日
Thank you very much for your time and effort. kp and ki were not put randomly, but the design could be wrong. I will check and reply. Once again, thank you.
Birdman
Birdman 2017 年 11 月 8 日
Ok, let me know the results.
Shyam
Shyam 2017 年 11 月 11 日
編集済み: Shyam 2017 年 11 月 11 日
There was an error in my earlier PI design I am trying to design the PI for this system (attached). Could you please suggest some method to do it. I have derived the transfer function, act/input. I am unable to see what is the open loop transfer function so that i can design the PI using bode
Shyam
Shyam 2017 年 11 月 11 日
Thanks, i figured out the issue.
Birdman
Birdman 2017 年 11 月 11 日
I was about to solve it, too. Glad you figured that out.

サインインしてコメントする。

その他の回答 (1 件)

Shyam
Shyam 2017 年 11 月 30 日

0 投票

Another problem involving simple transfer function. I have attached the simulink model and init mfile. I am getting the error regarding singularity in the solution.

14 件のコメント

Birdman
Birdman 2017 年 11 月 30 日
I solved it by changing your solver to Fixed-Step and adding some delays to prevent algebraic loop. But please make sure that your model is reasonably defined.
Shyam
Shyam 2017 年 11 月 30 日
編集済み: Shyam 2017 年 11 月 30 日
how to change it to .slx Reasonably defined meaning that values of the parameters are reasonable? Thanks, i will check that.
Birdman
Birdman 2017 年 11 月 30 日
Values that will not cause algebraic loop. You do not need to change to slx.
Shyam
Shyam 2017 年 11 月 30 日
ok. When i click on the link, i am seeing some code instead of simulink blocks.
Birdman
Birdman 2017 年 11 月 30 日
No, you have to download it first to your computer. Then open it at Simulink :)
Shyam
Shyam 2017 年 11 月 30 日
There is no download option. As i click on the link, the code appears. If i right-click also, there is no download option. Sorry to disturb with these silly things.
Birdman
Birdman 2017 年 11 月 30 日
編集済み: Birdman 2017 年 11 月 30 日
Right click and click on Save link as
Shyam
Shyam 2017 年 11 月 30 日
I am getting the following error message (attached)
Birdman
Birdman 2017 年 11 月 30 日
What is your MATLAB version?
Shyam
Shyam 2017 年 11 月 30 日
R2016b..Today license is getting expired. I am installing the latest version now.
Birdman
Birdman 2017 年 11 月 30 日
Then you can easily open this one in the latest version. Therefore I am not sending the exported version to R2016b.
Shyam
Shyam 2017 年 11 月 30 日
ok..
Ramu Nair R
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
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.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeGeneral Applications についてさらに検索

タグ

質問済み:

2017 年 11 月 7 日

編集済み:

2017 年 12 月 1 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by