필터 지우기
필터 지우기

Using assignment block for maximum nominal value

조회 수: 2 (최근 30일)
Anne
Anne 2020년 5월 21일
편집: Anne 2020년 5월 21일
Hello!
I have a question about a Simulink that how to implement a function in an assignment block. I am trying more-less to simulate this example: https://www.mathworks.com/help/physmod/sps/powersys/ref/windturbine.html. I need to find the nominal (maximum) Cp like in the graph:
and in order to do that I need to use the equations:
,
where lambda=TSR and is previusly calculated from other blocks. Beeta is an angle. I am trying to do it something like that:
But I am not sure how. I don't know if I am doing it right: opened "Callbacks" tab from properties of "Nominal Cp" assignment block and entered to "InitFCN" the code:
lambda = TSR
i=1/(lambda+0.08*u)-(0.035/u^3+1)
nomCp=max(0.5176*(116*(i)-0.4*u-5)*exp(-21*i)+0.0068*lambda)
I think I am doing something wrong cause I keep receiving errors, the last one is: "Error evaluating 'InitFcn' callback of Assignment block '1/Nominal Cp'. Undefined function or variable 'TSR'.
How to define variable TSR as the output of previous calculation and to use it for assignment block?
It is only my second task with Simulink, so I don'r understand that SImulink+Matlab code aspect very well.
Thank you very much if you could help me with that!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by