Hi. I'm having some problems with using a look-up table in Matlab using the function fixpt_interp1(xdata,ydata,x,sfix(8),1 (x scale), sfix(16), 1, 'Floor').
xdata = 0:1:40
ydata = [0.0 0.0 55.0 .......... 7580 (at rated) .... 0 (cutoff)]
My xdata and ydata is a power curve for a wind turbine, with xdata being wind speeds and ydata being Power at this particular wind speed. My x-variable is a time series of wind speeds between 0 - 35 m/s. I want to insert my wind speed time series so that the output of the function is a power time series.
My problem is that once a wind speed is between two integers, for example 9.1 m/s, the output gives me the equivalent power of 9 m/s (3750 kW). I know that 'Floor' makes this happen, because 'Ceiling' will make it go to the power of 10 m/s (4850 kW). Still, I thought this function would interpolate between the two points, giving me a power of 3860 kW, but it doesn't seem so.
Therefore I tried to interpolate the curve using:
yi = interp1(xdata,ydata,xi), where
xi = 0:0.1:40
When I then insert yi and xi in fixpt_interp1, I get the right amount of power for 9.1 m/s, but it messes up other things, like putting all wind speeds over 12.7 m/s to 0 kW, when 25 m/s is the cut-off speed.
Does anyone have a solution for this problem?
If you need more info, please let me know.
Jonas from Norway

댓글 수: 2

Jan
Jan 2013년 2월 7일
편집: Jan 2013년 2월 7일
What is the problem exactly? Why do you use the fixed point type? Why is 0kW replied for speeds over 12.7, when not 12.7 is the cut-off but 25? How are "other things messed up" exactly? I think, that the solution is to avoid that these "other things" are "messed up", therefore I suggest to describe this point with any details.
Thorsten
Thorsten 2013년 2월 7일
Please provide your full ydata such that we can see how interp1 "messes up other things".

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

답변 (1개)

Surya Vamsi Krishna Chivukula
Surya Vamsi Krishna Chivukula 2016년 9월 21일

1 개 추천

I had a similar problem with fixpt_itnerp1. Try using the following:
y = fixpt_interp1(xdata, ydata, x, float('single'), [], float('single'), [], 'Floor');
Setting the 'x' and 'y' data types as float('single') and letting MATLAB choose it's own 'x' and 'y' scaling does the trick.

카테고리

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

질문:

2013년 2월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by