Clear Filters
Clear Filters

Using assignment block for maximum nominal value

2 views (last 30 days)
Anne
Anne on 21 May 2020
Edited: Anne on 21 May 2020
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!

Answers (0)

Categories

Find more on Simulink Functions in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!