1 Introduction

Most of algorithms or logics to solve mathematical problems have multiple parameters such as coefficients and thresholds whose values may critically affect their performance and thus should be carefully selected. Conventionally, it will take a considerable of trials and errors for developers or users to tune the values. They will select the proper values for the parameters and apply the algorithm/logic using them to available input data sets. Then, by evaluating the results, they modify the values of specific parameters and repeat the process. As a result, the tuning process of parameters may consume a great deal of energy, and may not always provide the optimal ones, because the results principally depend on adopting input data sets.

In this paper, we present a parameter optimization tool that can be extensively used for a variety of algorithms or logics to explore their optimal parameter values. For now, the target algorithm or logic whose parameters are optimized by the proposed tool is called the logic, and the program to implement a logic is the logic program. The proposed tool is separated from the logic program so that the developers of logic programs can implement them independently, if they follow the few conditions to use this tool, which will be discussed later.

This tool adopts a local search method to detect optimal parameter values. This method jointly uses the tabu table and the hill-climbing function to avoid a local minimum convergence [1, 2]. More specifically, this algorithm repeats three phases: (1) to prepare three sets of parameters whose values are slightly changed between them by following the given specification, (2) to apply the logic program with them using input data sets, and (3) to select the best parameter value set among them which returns the best score or evaluation result that is output from the logic program.

In this paper, we apply the proposed tool to optimize the parameters of the throughput estimation model for the wireless communication link in a wireless local-area network (WLAN) [3,4,5]. The accurate throughput estimation model plays an important role in designing efficient WLAN systems [6,7,8]. Our model first calculates the receiving signal strength at the receiver using the Log distance path loss model [9]. Then, it calculates the throughput using the sigmoid function originally. Each model/function has several parameters to be tuned, which are optimized by the tool. By comparing the throughput estimation errors between the manual tuning and the tool, the effectiveness of the tool is verified.

In [10], Dakota was presented as a software tool with similar functions. It has been developed by the Sundia National Research Laboratory in USA as open source software. The comparisons with our tool will be involved in future works.

The rest of this paper is organized as follows: Sects. 2 and 3 present the proposed parameter optimization tool and its adopted algorithm respectively. Section 4 shows the application to the throughput estimation model for WLANs. Finally, Sect. 5 remarks the conclusion of this paper with future works.

2 Parameter Optimization Tool

In this section, we present the proposed parameter optimization tool. The parameter optimization tool is independent from the logic program for generalization, running the program as its child process. The effectiveness of the parameter values to run the logic program is evaluated by the output score from the program given in the output file. This tool searches the parameter values that maximize or minimize the output score. Currently, it is implemented by Java as a desktop application. In future works, it will be implemented as a Web application.

A user of the tool is required to prepare the following five files.

1. Parameter Specification File

The parameter specification file describes the condition how to change the value of each parameter during the search process. “parameter.csv” must be used as the file name. Each line in this file reflects the specification for one parameter, and must describe in the order of “parameter name”, “initial value”, “lower limit”, “upper limit”, and “change step”. The change step indicates one step change size of the parameter value when the tool changes it to generate a new value. For example, when the parameter name is x, the initial value is 50, the lower limit is 0, the upper limit is 100, and the change step is 5, x is initially assigned 50 and then, it can be changed to 0, 5, ..., 100 during the optimization process.

2. Logic Program File

The logic program file is a binary code file to run the logic, which can be executed through the command line. Any name is possible for this file. This file must satisfy the following two conditions:

  1. (1)

    When the program is executed, it receives the path for the parameter file in the argument and applies the parameter values in the file to the algorithm/logic.

  2. (2)

    When the program is completed, it outputs the score as the evaluation value in the text file “result.txt”.

With (1), the logic program can read the parameter values that are generated by the tool. With (2), the tool can read the score that is calculated in the logic program. For example, the parameter file for the previous example with three parameters is described as follows when their initial ones are used:

3. Sample Input Data File

The sample input data file contains the input data set to the logic program such that the result of the logic program is evaluated and used to optimize the parameter values in the tool. To improve the accuracy of the obtained parameter values, multimodal sample input data sets should be collected and adopted in the tool.

4. Score Output File

The score output file contains the score from the logic program to evaluate the current parameter values. The score can be given by the difference between measured and estimated throughputs in the throughput estimation model, the cost function for an optimization problem, and the S/N ratio for a signal processing filter.

5. Script File for Execution

The script file describes the sequence of the commands to execute the logic program. The file name must be “run.sh”. It describes the paths to the input files for the logic program. By modifying this script file, the user can change the name and the arguments for the logic program, and may run multiple logic programs sequentially to obtain one score. In the following example, line 10 executes the Java logic program with three paths to the input files. When the logic program is executed with multiple sample input data files continuously, the array to describe these files should be prepared and the loop procedure be adopted.

figure a

The processing flow of the proposed tool is shown as follows:

  1. (1)

    The parameter optimization tool (T) generates the initial parameter file by copying the initial values in the parameter specification file.

  2. (2)

    T executes the script file using the current parameter file.

    1. (a)

      The logic program (L) reads one sample input data file.

    2. (b)

      L computes the algorithm/logic.

    3. (c)

      L writes the score in the score output file.

  3. (3)

    T reads the score from the score output file.

  4. (4)

    When the termination condition is satisfied, T goes to (5), otherwise goes to (6).

  5. (5)

    T changes the parameter file based on the algorithm in the next section, and goes to (2).

  6. (6)

    T selects the parameter values with the best score and outputs it.

3 Parameter Optimization Algorithm

In this section, we describe the parameter optimization algorithm in the tool [1, 2]. The following symbols are used in the algorithm:

  • P: the set of the n parameters for the algorithm/logic in the logic program whose values should be optimized.

  • \({p_i}\): the ith parameter in P (\(1 \le i \le n\)).

  • \({\varDelta p_i}\): the change step for \({p_i}\).

  • \({t_i}\): the tabu period for \({p_i}\) in the tabu table.

  • S(P): the score of the algorithm/logic using P.

  • \(P_{best}\): the best set of the parameters.

  • \(S(P_{best})\): the score of the algorithm/logic where \(P_{best}\) is used.

  • L: the log or cashe of generated parameter values and their scores.

The algorithm procedure that minimizes the score is described as follows:

  1. (1)

    Clear the generated parameter log L.

  2. (2)

    Set the initial value in the parameter file for any \({p_i}\) in P, and set 0 for any tabu period \({t_i}\), and set a large value for \(S(P_{best})\).

  3. (3)

    Generate the neighborhood parameter value sets for P by:

    1. (a)

      Randomly select one parameter \({p_i}\) for \({t_i=0}\).

    2. (b)

      Calculate parameter values of \({{p_i}^-}\) and \({{p_i}^+}\) by:

      $$\begin{aligned} {p_i}^-=p_i- \varDelta p_i, \text{ if }~{p_i}>\text{ lower } \text{ limit },\nonumber \\ {p_i}^+=p_i+ \varDelta p_i, \text{ if }~{p_i}<\text{ upper } \text{ limit }. \end{aligned}$$
      (1)
    3. (c)

      Generate the neighborhood parameter value sets \({P}^-\) and \({P}^+\) by replacing \(p_i\) by \({p_i}^-\) or \({p_i}^+\):

      $$\begin{aligned} {P}^-=\{p_1, p_2, \ldots ,{p_i}^-, \ldots , p_n\} \nonumber \\ {P}^+=\{p_1, p_2, \ldots , {p_i}^+, \ldots , p_n\} \nonumber \end{aligned}$$
      (2)
  4. (4)

    When P (\({P}^-\), \({P}^+\)) exists in L, obtain S(P) (\(S(P^-)\), \(S(P^+)\)) from L. Otherwise, execute the logic program using P (\({P}^-\), \({P}^+\)) to obtain S(P) (\(S(P^-)\), \(S(P^+)\)), and write P and S(P) (\({P}^-\) and \(S(P^-)\), \({P}^+\) and \(S(P^+)\)) into L.

  5. (5)

    Compare S(P), \(S(P^-)\), and \(S(P^+)\), and select the parameter value set that has the largest one among them.

  6. (6)

    Update the tabu period by:

    1. (a)

      Decrement \(t_i\) by \(-1\) if \(t_i>0\).

    2. (b)

      Set the given constant tabu period TB for \({t_i}\) if S(P) is largest at (5) and \({p_i}\) is selected at (3)(a).

  7. (7)

    When S(P) is continuously largest at (5) for the given constant times, go to (8). Otherwise, go to (3).

  8. (8)

    When the hill-climbing procedure in (9) is applied for the given constant times HT, terminate the algorithm and output \(P_{best}\). Otherwise, go to (9).

  9. (9)

    Apply the hill-climbing procedure:

    1. (a)

      If \(S(P)<S(P_{best})\), update \(P_{best}\) and \(S(P_{best})\) by P and S(P).

    2. (a)

      Reset P by \(P_{best}\).

    3. (c)

      Randomly select \({p_i}\) in P, and randomly change the value of \({p_i}\) within its range.

    4. (d)

      Go to (3).

4 Application to Throughput Estimation Model for WLAN

In this section, we reveal the application results of the proposed tool to the throughput estimation model for WLAN in [3, 4] with the model extension to improve the accuracy.

4.1 Overview of Throughput Estimation Model

This model estimates the throughput or transmission speed of a wireless communication link between a source node and a destination node in WLAN. First, this model estimates the receiving signal strength at the destination node using the Log distance path loss model by considering the distance and the obstacles between the end nodes. Next, it estimates the throughput using the sigmoid function from the receiving signal strength. Each function has several parameters that can affect the estimation accuracy. In [4], three network fields composed of multiple small rooms are considered, and throughputs between APs and hosts in different locations were measured using Iperf [11] and estimated by the model, where the parameter values for the model were tuned manually. For now, we discuss the results regarding that the source node is an AP and the destination node is a host.

The results in [4] show that prominent differences exist in specific links between estimated throughputs and measured ones. As the reason, they estimated that the model only considers the direct signal along the line of sight (LOS) at the host. It does not consider the multipath effect due to the indirect signal reflected at the walls, even if the indirect signal is stronger than the direct signal. The direct signal becomes exceedingly weak when it passes several walls or obstacles along the path. If the indirect signal passes only a few walls, the receiving signal strength of the host of this indirect signal can be much larger and the estimated throughput can be increased.

Therefore, to consider such indirect signals, we propose the extension of the throughput estimation model. For simplicity, we assume that for each host in the field, there exists a reflecting point on the wall in the same room such that the signal strength of the AP is the largest, and the indirect signal reaches the host through this reflecting point after the signal is attenuated there.

4.2 Input and Output Files

The input files to the logic program for the throughput estimation model are as follows:

  • Network field file: it describes the set of the two coordinates of the end points on each wall and the wall type.

  • Device coordinate file: it describes the set of the coordinates for one AP and plural hosts.

  • Reflecting point file: it describes the set of the coordinates of the reflecting points for the hosts.

  • Parameter file: it describes the parameter values of the model.

  • Sample input data file: it describes the measured signal strengths and throughput at the hosts.

The summation of the absolute value of the difference between each measured and estimated throughput is output as the score for the current parameter values in the score output file.

4.3 Throughput Estimation Procedure

The computation procedure of the throughput estimation model including the extension is as follows:

  1. (1)

    Calculate the Euclid distance d (m) for each link (AP/host pair) by:

    $$\begin{aligned} d = \root \of {(AP_x-H_x)^2+(AP_y-H_y)^2} \end{aligned}$$
    (3)

    where \(AP_x\) and \(AP_y\) represent the x and y coordinates for the AP, and \(H_x\) and \(H_y\) represent the x and y coordinates for the host.

  2. (2)

    Find the walls intersecting with the link. Here, the link and the wall are regarded as line segments where their intersection is judged by considering the intersection between the two line segments.

  3. (3)

    Estimate the receiving signal strength at the host using the Log distance path loss mode and consider the indirect signal:

    1. (a)

      Calculate the receiving signal strength \(P_{di}\) at the host through the direct signal:

      $$\begin{aligned} P_{dir} = P_1-10 \alpha \log _{10} d - \sum _{k} n_k W_k \end{aligned}$$
      (4)

      where \(P_{dir}\) represents the receiving signal strength (dBm) at the host with the distance d (m) from the AP, \(P_1\) does the signal strength (dBm) at the host with 1m distance from the source node, \(\alpha \) does the attenuation factor that should be optimized, \(n_k\) does the number of walls with type k, and \(W_k\) does the signal attenuation factor (dBm) of the type k wall.

    2. (b)

      Calculate the receiving signal strength through the indirect signal:

      1. (1)

        Calculate the receiving signal strength \(P_{ref}\) (dBm) at the reflecting point for each host using (4).

      2. (2)

        Calculate the receiving signal strength \(P_{ind}\) (dBm) at the host by the indirect signal, where the receiving signal strength at (1) is used as the transmitting signal strength from the reflecting point using (5).

        $$\begin{aligned} P_{ref}= & {} P_1-10 \alpha \log _{10} r - \sum _{k} n_k W_k \\ P_{ind}= & {} P_r-10 \alpha \log _{10} t - W_{ref} \end{aligned}$$
        (5)

        where r (m) represents the distance between the AP and the reflecting point, t (m) does the distance between the reflecting point and the host, and \(W_{ref}\) (dBm) does the attenuation factor at the reflecting point.

    3. (c)

      Select the larger one between \(P_{dir}\) and \(P_{ind}\) for the receiving signal strength \(P_h\) (dBm) at the host.

  4. (4)

    Calculate the estimated throughput \(S_h\) (Mbps) using the sigmoid function in (6).

    $$\begin{aligned} S_h=\frac{a}{1+exp(\frac{P_h-b}{c})} \end{aligned}$$
    (6)

    where a, b, and c are constant coefficients.

4.4 Application of Tool

By applying the proposed tool, the values of the parameters for the throughput estimation model, namely, \(P_1\), \(\alpha \), \(W_k\), and \(W_{ref}\) in (3), (5), and (4), and a, b, and c in (6) are optimized. \(W_k\) is prepared for each wall type. In this paper, the corridor wall (\(k=1\)), the partition wall (\(k=2\)), the intervening wall (\(k=3\)), the glass wall (\(k=4\)), and the elevator wall (\(k=5\)) are considered. For the parameters in the parameter optimization algorithm, \(TB=16\) and \(HT=10\) are adopted. For the sample input data files, the measurement results in [4] are used in the application of the tool.

Table 1. Throughput estimation errors.

The three network fields in [4] are considered. Here, in field#1, one additional AP is allocated between the hosts 307-3 and Ref-3 and one AP is at the center in D307, in addition to the AP in [4]. In field#2, two additional APs are also allocated at the similar positions as in field#1. The reflecting point for each host is manually selected. Because field#1 and field#2 are located in the same building on different floors, all the sample input data sets measured with six APs and 28 hosts in the two fields are used together to select the optimal values of the parameters.

Then, we compute the throughput estimation model using the optimized parameter values. Table 1 summarizes the average, maximum, and minimum scores or estimation errors and the variances for each AP in the three fields. For reference, Fig. 1 shows the measured and estimated throughputs for the hosts with AP1 in field#3. Table 1 indicates that the accuracy of the throughput estimations of the model is generally improved by the tool, although it is degraded for certain hosts. The analysis of the reason and the provision will be explored in future works. The accuracy for the two hosts, E-2 and E-4, with AP1 in field#3, is greatly improved by the extended model. These results have verified the contribution of the proposed tool and model extension in this paper.

Fig. 1.
figure 1

Throughputs for AP1 in field#3.

5 Conclusion

This paper presented a versatile parameter optimization tool to find optimal values of parameters for various algorithms or logics to solve mathematical problems. The effectiveness of the tool was confirmed through applications to the throughput estimation model for wireless local-area networks, where the extension of the model was also presented to enhance the accuracy. In future works, the tool will be applied to different algorithms/logics for verifications, and the user interface will be improved including the implementation of the Web application.