iccsa-21-wind

git clone https://git.igankevich.com/iccsa-21-wind.git
Log | Files | Refs

commit dd50ae6b0655ca2543c683bc37f5a844215b74b6
parent 280f43f3d28a8558fec07edf5dad7b3745f7f3bc
Author: Ivan Gankevich <i.gankevich@spbu.ru>
Date:   Tue,  4 May 2021 13:13:12 +0300

RMSE -> NRMSE

Diffstat:
gnuplot/acf.gnuplot | 12++++++------
gnuplot/daily-rmse.gnuplot | 6+++---
gnuplot/direction-dist.gnuplot | 4++--
gnuplot/hold-peak.gnuplot | 6+++---
gnuplot/velocity-dist-weibull2.gnuplot | 12++++++------
gnuplot/velocity-dist.gnuplot | 12++++++------
gnuplot/velocity-xy-dist.gnuplot | 2+-
main.tex | 16++++++++--------
8 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/gnuplot/acf.gnuplot b/gnuplot/acf.gnuplot @@ -36,7 +36,7 @@ load "build/gnuplot/acf_rmse.gnuplot" ################################### set yrange [0:2] -set title sprintf('RMSE_x = %.1f%%', (acf_x_rmse_max*100)) +set title sprintf('NRMSE_x = %.1f%%', (acf_x_rmse_max*100)) plot \ filename('x',acf_x_rmse_max_timestamp) index 0 using (-$1):2 with points pt 6 lc '#404040',\ '' index 0 using (-$1):3 with lines lw 2 lc '#4040c0',\ @@ -44,7 +44,7 @@ filename('x',acf_x_rmse_max_timestamp) index 0 using (-$1):2 with points pt 6 lc '' index 1 using ($1):3 with lines lw 2 lc '#c04040' set yrange [0:0.25] -set title sprintf('RMSE_y = %.1f%%',(acf_y_rmse_max*100)) +set title sprintf('NRMSE_y = %.1f%%',(acf_y_rmse_max*100)) plot \ filename('y',acf_y_rmse_max_timestamp) index 0 using (-$1):2 with points pt 6 lc '#404040',\ '' index 0 using (-$1):3 with lines lw 2 lc '#4040c0',\ @@ -52,7 +52,7 @@ filename('y',acf_y_rmse_max_timestamp) index 0 using (-$1):2 with points pt 6 lc '' index 1 using ($1):3 with lines lw 2 lc '#c04040' set yrange [0:2] -set title sprintf('RMSE_z = %.1f%%', (acf_z_rmse_max*100)) +set title sprintf('NRMSE_z = %.1f%%', (acf_z_rmse_max*100)) plot \ filename('z',acf_z_rmse_max_timestamp) index 0 using (-$1):2 with points pt 6 lc '#404040',\ '' index 0 using (-$1):3 with lines lw 2 lc '#4040c0',\ @@ -65,7 +65,7 @@ filename('z',acf_z_rmse_max_timestamp) index 0 using (-$1):2 with points pt 6 lc set bmargin 3 set yrange [0:0.25] -set title sprintf('RMSE_x = %.1f%%', (acf_x_rmse_min*100)) +set title sprintf('NRMSE_x = %.1f%%', (acf_x_rmse_min*100)) plot \ filename('x',acf_x_rmse_min_timestamp) index 0 using (-$1):2 with points pt 6 lc '#404040',\ '' index 0 using (-$1):3 with lines lw 2 lc '#4040c0',\ @@ -73,7 +73,7 @@ filename('x',acf_x_rmse_min_timestamp) index 0 using (-$1):2 with points pt 6 lc '' index 1 using ($1):3 with lines lw 2 lc '#c04040' set yrange [0:0.25] -set title sprintf('RMSE_y = %.1f%%',(acf_y_rmse_min*100)) +set title sprintf('NRMSE_y = %.1f%%',(acf_y_rmse_min*100)) plot \ filename('y',acf_y_rmse_min_timestamp) index 0 using (-$1):2 with points pt 6 lc '#404040',\ '' index 0 using (-$1):3 with lines lw 2 lc '#4040c0',\ @@ -81,7 +81,7 @@ filename('y',acf_y_rmse_min_timestamp) index 0 using (-$1):2 with points pt 6 lc '' index 1 using ($1):3 with lines lw 2 lc '#c04040' set yrange [0:0.1] -set title sprintf('RMSE_z = %.1f%%', (acf_z_rmse_min*100)) +set title sprintf('NRMSE_z = %.1f%%', (acf_z_rmse_min*100)) plot \ filename('z',acf_z_rmse_min_timestamp) index 0 using (-$1):2 with points pt 6 lc '#404040',\ '' index 0 using (-$1):3 with lines lw 2 lc '#4040c0',\ diff --git a/gnuplot/daily-rmse.gnuplot b/gnuplot/daily-rmse.gnuplot @@ -23,9 +23,9 @@ do for [timestamp in "1614546000 1614978000 1615496400 1616187600 1616274000 161 } plot \ - 'build/daily-rmse' using (localtime($1)):2 with lines lc '#c04040' title 'RMSE_x',\ - 'build/daily-rmse' using (localtime($1)):3 with lines lc '#40c040' title 'RMSE_y',\ - 'build/daily-rmse' using (localtime($1)):4 with lines lc '#4040c0' title 'RMSE_z',\ + 'build/daily-rmse' using (localtime($1)):2 with lines lc '#c04040' title 'NRMSE_x',\ + 'build/daily-rmse' using (localtime($1)):3 with lines lc '#40c040' title 'NRMSE_y',\ + 'build/daily-rmse' using (localtime($1)):4 with lines lc '#4040c0' title 'NRMSE_z',\ STATS_mean with lines lc '#808080' dashtype 2 notitle diff --git a/gnuplot/direction-dist.gnuplot b/gnuplot/direction-dist.gnuplot @@ -20,7 +20,7 @@ rad2deg(rad) = (rad * 180) / pi filename = sprintf('build/direction/vonmises/%d', direction_rmse_max_timestamp) set lmargin 5 -set title sprintf('RMSE = %.0f%%, mean speed = %.1fm/s', \ +set title sprintf('NRMSE = %.0f%%, mean speed = %.1fm/s', \ round(direction_rmse_max*100), direction_rmse_max_speed) plot \ filename index 0 using (rad2deg($1)):2 every 5 with points pt 6 lc '#404040' title 'Observed PDF of υ_x',\ @@ -29,7 +29,7 @@ filename index 0 using (rad2deg($1)):2 every 5 with points pt 6 lc '#404040' tit filename = sprintf('build/direction/vonmises/%d', direction_rmse_min_timestamp) set lmargin 5 -set title sprintf('RMSE = %.0f%%, mean speed = %.1fm/s', \ +set title sprintf('NRMSE = %.0f%%, mean speed = %.1fm/s', \ round(direction_rmse_min*100), direction_rmse_min_speed) plot \ filename index 0 using (rad2deg($1)):2 every 5 with points pt 6 lc '#404040' title 'Observed PDF of υ_x',\ diff --git a/gnuplot/hold-peak.gnuplot b/gnuplot/hold-peak.gnuplot @@ -24,7 +24,7 @@ set yrange [0:5] set ytics 0,1,5 set xtics 0,30 -set title sprintf('RMSE = %.1f%%', (speed_rmse_max*100)) +set title sprintf('NRMSE = %.1f%%', (speed_rmse_max*100)) plot \ filename(speed_rmse_max_timestamp) index 0 using 1:2 with points pt 6 lc '#404040',\ '' index 0 using 1:3 with lines lw 2 lc '#c04040',\ @@ -32,13 +32,13 @@ filename(speed_rmse_max_timestamp) index 0 using 1:2 with points pt 6 lc '#40404 set key Left reverse at screen 0.80, screen 1.00 -set title sprintf('RMSE = %.1f%%', (speed_rmse_min*100)) +set title sprintf('NRMSE = %.1f%%', (speed_rmse_min*100)) plot \ filename(speed_rmse_min_timestamp) index 0 using 1:2 with points pt 6 lc '#404040' title 'Load cell data',\ '' index 0 using 1:3 with lines lw 2 lc '#c04040' title 'HP-866A data',\ '' index 1 using 1:2 with lines lw 2 lc '#c0c040' title 'Smoothed load cell data' -# set title sprintf('RMSE_x = %.1f%%', (speed_rmse_longest*100)) +# set title sprintf('NRMSE_x = %.1f%%', (speed_rmse_longest*100)) # plot \ # filename(speed_rmse_longest_timestamp) index 0 using 1:2 with points pt 6 lc '#404040',\ # '' index 0 using 1:3 with lines lw 2 lc '#c04040',\ diff --git a/gnuplot/velocity-dist-weibull2.gnuplot b/gnuplot/velocity-dist-weibull2.gnuplot @@ -35,7 +35,7 @@ negative(x) = x>0 ? (1/0) : x set lmargin 5 set title offset 0,-1 -set title sprintf('RMSE_x = %f', 0.08700399) +set title sprintf('NRMSE_x = %f', 0.08700399) set xrange [-4:4] plot \ 'build/velocity/x/weibull2/1615914000' index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of υ_x',\ @@ -47,7 +47,7 @@ plot \ set lmargin 5 #set xrange [-3:3] set xlabel 'υ_y' -set title sprintf('RMSE_y = %f', 0.08648245) +set title sprintf('NRMSE_y = %f', 0.08648245) set xrange [-3:5] plot \ 'build/velocity/y/weibull2/1616187600' index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of υ_y',\ @@ -60,7 +60,7 @@ set rmargin 2 set xrange [-4:4] #set xtics -2,1,2 set xlabel 'υ_z' -set title sprintf('RMSE_z = %f', 0.1744659) +set title sprintf('NRMSE_z = %f', 0.1744659) plot \ 'build/velocity/z/weibull2/1616958000' index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of υ_z',\ '' index 0 using (positive($1)):3 with lines lw 2 lc '#c04040' title 'Estimated PDF of positive υ_z',\ @@ -77,7 +77,7 @@ set ytics 0,0.1 #set xtics -10,1 set lmargin 5 -set title sprintf('RMSE_x = %f', 0.008555768) +set title sprintf('NRMSE_x = %f', 0.008555768) plot \ 'build/velocity/x/weibull2/1616382000' index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of υ_x',\ '' index 0 using (positive($1)):3 with lines lw 2 lc '#c04040' title 'Estimated PDF of positive υ_x',\ @@ -87,7 +87,7 @@ plot \ set lmargin 5 #set xrange [-3:3] set xlabel 'υ_y' -set title sprintf('RMSE_y = %f', 0.009301931) +set title sprintf('NRMSE_y = %f', 0.009301931) #set xrange [-3:5] plot \ 'build/velocity/y/weibull2/1614877200' index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of υ_y',\ @@ -98,7 +98,7 @@ plot \ set rmargin 2 #set xtics -2,1,2 set xlabel 'υ_z' -set title sprintf('RMSE_z = %f', 0.01133067) +set title sprintf('NRMSE_z = %f', 0.01133067) plot \ 'build/velocity/z/weibull2/1614330000' index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of υ_z',\ '' index 0 using (positive($1)):3 with lines lw 2 lc '#c04040' title 'Estimated PDF of positive υ_z',\ diff --git a/gnuplot/velocity-dist.gnuplot b/gnuplot/velocity-dist.gnuplot @@ -29,7 +29,7 @@ round(x) = floor(x+0.5) filename = sprintf('build/velocity/x/weibull/%d', x_rmse_max_timestamp) set lmargin 5 set title offset 0,-1 -set title sprintf('RMSE_x = %.1f%%', (x_rmse_max*100)) +set title sprintf('NRMSE_x = %.1f%%', (x_rmse_max*100)) set xrange [-10:10] plot \ filename index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of υ_x',\ @@ -40,7 +40,7 @@ filename index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of filename = sprintf('build/velocity/y/weibull/%d', y_rmse_max_timestamp) set lmargin 5 set xlabel 'υ_y' -set title sprintf('RMSE_y = %.1f%%',(y_rmse_max*100)) +set title sprintf('NRMSE_y = %.1f%%',(y_rmse_max*100)) #set xrange [-4:4] plot \ filename index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of υ_y',\ @@ -52,7 +52,7 @@ filename index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of filename = sprintf('build/velocity/z/weibull/%d', z_rmse_max_timestamp) #set xrange [-4:4] set xlabel 'υ_z' -set title sprintf('RMSE_z = %.1f%%', (z_rmse_max*100)) +set title sprintf('NRMSE_z = %.1f%%', (z_rmse_max*100)) plot \ filename index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of υ_z',\ '' index 0 using (positive($1)):3 with lines lw 2 lc '#c04040' title 'Estimated PDF of positive υ_z',\ @@ -74,7 +74,7 @@ set ytics 0,0.2 filename = sprintf('build/velocity/x/weibull/%d', x_rmse_min_timestamp) set lmargin 5 -set title sprintf('RMSE_x = %.1f%%', (x_rmse_min*100)) +set title sprintf('NRMSE_x = %.1f%%', (x_rmse_min*100)) plot \ filename index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of υ_x',\ '' index 0 using (positive($1)):3 with lines lw 2 lc '#c04040' title 'Estimated PDF of positive υ_x',\ @@ -85,7 +85,7 @@ filename = sprintf('build/velocity/y/weibull/%d', y_rmse_min_timestamp) set lmargin 5 #set xrange [-3:3] set xlabel 'υ_y' -set title sprintf('RMSE_y = %.1f%%', (y_rmse_min*100)) +set title sprintf('NRMSE_y = %.1f%%', (y_rmse_min*100)) #set xrange [-3:5] plot \ filename index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of υ_y',\ @@ -95,7 +95,7 @@ filename index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of filename = sprintf('build/velocity/z/weibull/%d', z_rmse_min_timestamp) set xlabel 'υ_z' -set title sprintf('RMSE_z = %.1f%%', (z_rmse_min*100)) +set title sprintf('NRMSE_z = %.1f%%', (z_rmse_min*100)) plot \ filename index 0 using 1:2 with points pt 6 lc '#404040' title 'Observed PDF of υ_z',\ '' index 0 using (positive($1)):3 with lines lw 2 lc '#c04040' title 'Estimated PDF of positive υ_z',\ diff --git a/gnuplot/velocity-xy-dist.gnuplot b/gnuplot/velocity-xy-dist.gnuplot @@ -87,7 +87,7 @@ set cbtics offset -0.5,0 set xrange [-1*s:1*s] set yrange [-1*s:1*s] set title offset 0,0.5 -set title sprintf('RMSE = %.0f%%, mean speed = %.1fm/s', round(rmse*100), speed) +set title sprintf('NRMSE = %.0f%%, mean speed = %.1fm/s', round(rmse*100), speed) #plot filename using 1:2:(positive($3)) with points pt 7 ps 0.25 linecolor palette z plot filename using ($1+0.005):2:(circle($1,$2,$3)) with image #plot filename_cnt using (circle($1,$2,$1)):2 with lines lc '#404040' diff --git a/main.tex b/main.tex @@ -452,9 +452,9 @@ calculated wind speed and direction from the collected samples and fitted them into Weibull distribution and von Mises distribution respectively. These are typical models for wind speed and direction~\cite{carta2008,carta2008joint}. Then we found the intervals with the best and the worst fit for these models -using normalised root-mean-square error (RMSE) calculated as +using normalised root-mean-square error (NRMSE) calculated as \begin{equation} - \text{RMSE} = \frac{\sqrt{\Expectation\left[\left(X_\text{observed}-X_\text{estimated}\right)^2\right]}}{X_\text{max}-X_\text{min}}. + \text{NRMSE} = \frac{\sqrt{\Expectation\left[\left(X_\text{observed}-X_\text{estimated}\right)^2\right]}}{X_\text{max}-X_\text{min}}. \end{equation} Here \(\Expectation\) is statistical mean, \(X_\text{observed}\) and \(X_\text{estimated}\) are observed and estimated values respectively. @@ -523,7 +523,7 @@ anemometer directed towards the mean wind direction as it measures the speed only. The data from the two anemometers was recorded synchronously. From the data we selected intervals with wind gusts and compared the measurements of the two anemometers. To compare them we scaled load cell anemometer measurements to -minimise RMSE of the difference between the two time series to compensate for +minimise NRMSE of the difference between the two time series to compensate for the errors in calibration coefficients. The results showed that there is some correspondence between the measurements of the two anemometers (figure~\ref{fig-hold-peak}). @@ -541,7 +541,7 @@ Finally, we computed autocovariance for each axis as \end{equation} and fitted it into~\eqref{eq-acf-approximation}. Per-axis ACFs have pronounced peak at nought lag and long tails. -The largest RMSE is 2.3\%. +The largest NRMSE is 2.3\%. Variances for \(x\) and \(y\) axes are comparable, but ACF for \(z\) axis has much lower variance. Parameters \(a\) and \(b\) from~\eqref{eq-acf-approximation} are positively @@ -626,7 +626,7 @@ will investigate further in future work. \section{Discussion} -RMSE of wind speed distribution approximation has positive correlation with +NRMSE of wind speed distribution approximation has positive correlation with wind speed: the larger the wind speed, the larger the error and vice versa. Larger error for low wind speeds is caused by larger skewness and kurtosis (see the first row of figure~\ref{fig-velocity-distributions}). Similar @@ -636,7 +636,7 @@ distributions. Such studies are outside of the scope of this paper, because here we verify anemometer measurements using well-established mathematical models, but the future work may include the study of these improvements. -RMSE of wind direction distribution approximation has negative correlation with +NRMSE of wind direction distribution approximation has negative correlation with wind speed: the larger the wind speed, the smaller the error and vice versa. This is in agreement with physical laws: the faster the flow is the more determinate its mean direction becomes, and the slower the flow is the more @@ -664,8 +664,8 @@ immediate wind speed and direction. In this paper we proposed three-axis anemometer that measures wind speed for each axis independently. We analysed the data collected by this anemometer and verified that per-axis wind speeds fit into Weibull distribution with the -largest RMSE of 6.7\% and wind directions fit into von Mises distribution with -the largest RMSE of 11\%. We estimated autocovariance functions for wind speed +largest NRMSE of 6.7\% and wind directions fit into von Mises distribution with +the largest NRMSE of 11\%. We estimated autocovariance functions for wind speed for each axis of the anemometer and used this approximations to simulate wind flow in Virtual Testbed. The parameters of these functions allow to control both wind speed and mean direction. The future work is to construct new