discrete controller Ts problem

3 ビュー (過去 30 日間)
Navin
Navin 2014 年 3 月 13 日
回答済み: Vahid Asadzadeh 2014 年 8 月 15 日
hello good day everyone, i am quite new to simulink and currently i am creating an induction motor and controlling its speed for a project in school(simulation of an electric vehicle). I am having a wierd problem, i was able to get it working last night, i was able to set the speed and from the output you could see the controller was working, however in the morning i keep getting an error, Undefined function or variable 'Ts'. I have tried using a simout and constant to declare this variable. i'm a bit new. Any help would be greatly appreciated.Thank you in advance.

回答 (3 件)

nl2605
nl2605 2014 年 3 月 13 日
So this Ts is actually in the DTC block of your model. Go to Explorer(by right clicking onto the DTC block). Then go to Unit Delay1, there you can see the time period defined as Ts. You need to change it there. Define some value. I am afraid I can't help you more than that as this is not my subject. Hope it helps.
  1 件のコメント
nl2605
nl2605 2014 年 3 月 13 日
By the way Ts usually refers to sampling time. So maybe that can help you.

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


Navin
Navin 2014 年 3 月 14 日
Ok so i found the problem, its the powergui block, however i am faced with a new problem. It only works if i copy and paste the powergui block from ac4_example in matlab. Wierly enough if you add the powergui yourself and set it to discrete and a value of 2e-6 it works sometimes and as you save and open again, it doesn't work. Does anyone have a solution to this problem? it would be greatly appreciated.

Vahid Asadzadeh
Vahid Asadzadeh 2014 年 8 月 15 日
Hi Navin, i am simulating power electronics problems and i use powergui in discrete mode. when i am trying to use Ts as symbolic sample time in some blocks (e.g. Switch, ...), i face an error "Ts is undefined function or parameter". I appreciate if you can advice me how to solve this matter.

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by