program block diagram in matlab, not simulink

Hi,
I have an task to calculate the transferfunction with an given, complicated block diagram. So I simplify the block diagram until I have the complete transfer function in the last block - not a problem. Now I have the next task which tells me to proof that my previous calculations are correct using matlab (not simulink, which would be the third task; and I have already done that to make sure my transfer function from task a) was correct)
So my question is: how do I translate a block diagram with given transfer functions into matlab code? I can easily define all the blocks' transfer functions like G1=tf(c1,d1);, but how do I tell matlab in code where a sum is, where a branch splits etc?
I would realy appreciate any help, as that is something our professor does not show in his vids and leaves to our own to figure out -.-
Thank you very much,
Dennis

 채택된 답변

Paul
Paul 2020년 11월 30일

0 개 추천

Look at
doc connect
and see if that helps.

댓글 수: 4

Looks very complicated in comparison to just using simulink, but I think that will work, I will definitely give it a try.
If it works I will accept the answer soon.
Thanks for the fast answer.
Hi Paul,
though I dont fully understand what the output means be first time looking at it for two seconds, just throwing a tf() over the output of the connect-command gave me my correct transfer function.
Thank you very much!
Feel free to ask any follow-up questions if something is still unclear after you've read the doc page(s).
Also, an alternaltive approach is to use the interconnection commands, like
doc series
doc parallel
doc feedback
You can use the these commands to implement what you probably already did by hand.
You can also use LTI system algebra, though that's not recommended.
Check this link for examples of these methods.
AMUTHA
AMUTHA 2024년 5월 18일
doc series

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Communications Toolbox에 대해 자세히 알아보기

제품

질문:

2020년 11월 30일

댓글:

2024년 5월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by