How to adjust value from matlab-mfile and feedback in simulink
56 次查看(过去 30 天)
显示 更早的评论
I am having a model in simulink uploaded at:
<http://www.freeimagehosting.net/79moh. >
In the first iteration the model should take value from matlab mfile and calculate error for Pid as e=r-i where 'i' is the value taken from matlab mfile but after that it should take feedback and calculate the error as e=r-y where 'y' is the value of feedback from space state. How can I do that in simulink. Any guidance?
0 个评论
采纳的回答
Muruganandham Subramanian
2012-12-5
编辑:Muruganandham Subramanian
2012-12-5
step1:Initialize all i/p data in m-file & variable 'i'
step2: use 'sim()' command to run your model
step3: store the value of 'y' in baseworkspace by 'To workspace' block from model
step4:calculation
8 个评论
Muruganandham Subramanian
2012-12-6
Initial condition in unit delay is user specified. so you can give any value like 0 or 2 or 5 or etc...
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!