[Intelligent Optimization Algorithm] Generalized Quadratic Interpolation Generalized Quadratic Interpolation (GQI) with matlab code

?About the author: A Matlab simulation developer who loves scientific research. He cultivates his mind and improves his technology simultaneously.

For code acquisition, paper reproduction and scientific research simulation cooperation, please send a private message.

Personal homepage: Matlab Research Studio

Personal credo: Investigate things to gain knowledge.

For more complete Matlab code and simulation customization content, click

Intelligent optimization algorithm Neural network prediction Radar communication Wireless sensor Power system

Signal processing Image processing Path planning Cellular automaton Drone

Content introduction

Intelligent optimization algorithm is an optimization method based on mathematical models and computer technology. Its purpose is to find the optimal solution or suboptimal solution under given constraints. Among them, the generalized quadratic interpolation algorithm is one of the intelligent optimization algorithms. It finds the local optimal solution by interpolating the objective function, and continuously iterates on this basis to finally achieve the global optimal solution.

The process of the generalized quadratic interpolation algorithm is as follows:

  1. Determine the initial point

First, an initial point needs to be determined, which can generally be randomly generated or selected based on experience. This initial point is the starting point for the beginning of the algorithm and the basis for subsequent iterations.

  1. Build an interpolation model

Next, a quadratic interpolation model needs to be constructed to approximate the objective function. In the generalized quadratic interpolation algorithm, the form of the interpolation model is:

f(x) = a0 + a1(x-x0) + a2(x-x0)^2 + a3(x-x1)(x-x2)

Among them, x0, x1, and x2 are three known points, and a0, a1, a2, and a3 are the coefficients to be found. What needs to be noted here is that x0, x1, and x2 need to meet certain conditions, such as not being collinear.

  1. Solving coefficients

Next, we need to solve for the coefficients a0, a1, a2, a3. This can be obtained by differentiating the interpolation model and then solving the system of equations. Specifically, you can first derive the derivative of f(x) with respect to x, and get:

f'(x) = a1 + 2a2(x-x0) + a3(x-x2)

Then, differentiate f'(x) with respect to x, and get:

f”(x) = 2a2 + a3

Then, take x as x0, x1, and x2 respectively, and get three equations, namely:

f'(x0) = a1 f'(x1) = a1 + 2a2(x1-x0) + a3(x1-x2) f'(x2) = a1 + 2a2(x2-x0) + a3(x2-x2)

By solving this system of equations, we can obtain the values of coefficients a0, a1, a2, and a3.

  1. Find the optimal solution

With the interpolation model and coefficients, the optimal solution can be found by solving the minimum value of the interpolation model. In the generalized quadratic interpolation algorithm, the position of the minimum value can be obtained by deriving the interpolation model, and then use this position as the next starting point to continue iteration until the stopping condition is met.

  1. Stop condition

During the iteration process, a stopping condition needs to be set to prevent the algorithm from looping infinitely. Common stopping conditions include:

(1) The change in the objective function value is less than a certain threshold; (2) The number of iterations reaches a certain upper limit; (3) The global optimal solution has been found.

In general, the generalized quadratic interpolation algorithm is a simple and effective optimization algorithm that can find the local optimal solution in a short time and gradually approach the global optimal solution. However, due to the limitations of the interpolation model, this algorithm may fall into a local optimal solution and fail to find the global optimal solution. Therefore, in practical applications, different optimization algorithms need to be selected according to specific situations to achieve better results.

Part of the code

%% Clear environment variables</code><code>warning off % Close alarm information</code><code>close all % Close open figure window</code><code>clear % Clear variables</code><code>clc % clear command line</code><code>?</code><code>%% import data</code><code>res = xlsread('dataset.xlsx');</code><code>?</code><code>%% divide the training set and test set</code><code>temp = randperm(357);</code><code>?</code><code>P_train = res(temp(1: 240), 1: 12)';</code><code>T_train = res(temp(1: 240), 13)';</code><code>M = size(P_train , 2);</code><code>?</code><code>P_test = res(temp(241: end), 1: 12)';</code><code>T_test = res(temp(241 : end), 13)';</code><code>N = size(P_test, 2);</code><code>?</code><code>%% data normalization</code><code>[p_train, ps_input] = mapminmax(P_train, 0, 1);</code><code>p_test = mapminmax('apply', P_test, ps_input);</code><code>t_train = ind2vec(T_train) ;</code><code>t_test = ind2vec(T_test );

Operation results

References

Some theories are quoted from online literature. If there is any infringement, please contact the blogger to delete it
Follow me to receive massive matlab e-books and mathematical modeling materials

Private message complete code, paper reproduction, journal cooperation, paper tutoring and scientific research simulation customization

1 Improvements and applications of various intelligent optimization algorithms
Production scheduling, economic scheduling, assembly line scheduling, charging optimization, workshop scheduling, departure optimization, reservoir scheduling, three-dimensional packing, logistics location selection, cargo space optimization, bus scheduling optimization, charging pile layout optimization, workshop layout optimization, Container ship stowage optimization, water pump combination optimization, medical resource allocation optimization, facility layout optimization, visible area base station and drone site selection optimization
2 Machine learning and deep learning
Convolutional neural network (CNN), LSTM, support vector machine (SVM), least squares support vector machine (LSSVM), extreme learning machine (ELM), kernel extreme learning machine (KELM), BP, RBF, width Learning, DBN, RF, RBF, DELM, XGBOOST, TCN realize wind power prediction, photovoltaic prediction, battery life prediction, radiation source identification, traffic flow prediction, load prediction, stock price prediction, PM2.5 concentration prediction, battery health status prediction, water body Optical parameter inversion, NLOS signal identification, accurate subway parking prediction, transformer fault diagnosis
2. Image processing
Image recognition, image segmentation, image detection, image hiding, image registration, image splicing, image fusion, image enhancement, image compressed sensing
3 Path planning
Traveling salesman problem (TSP), vehicle routing problem (VRP, MVRP, CVRP, VRPTW, etc.), UAV three-dimensional path planning, UAV collaboration, UAV formation, robot path planning, raster map path planning , multimodal transportation problems, vehicle collaborative UAV path planning, antenna linear array distribution optimization, workshop layout optimization
4 UAV applications
UAV path planning, UAV control, UAV formation, UAV collaboration, UAV task allocation, and online optimization of UAV safe communication trajectories
5 Wireless sensor positioning and layout
Sensor deployment optimization, communication protocol optimization, routing optimization, target positioning optimization, Dv-Hop positioning optimization, Leach protocol optimization, WSN coverage optimization, multicast optimization, RSSI positioning optimization
6 Signal processing
Signal recognition, signal encryption, signal denoising, signal enhancement, radar signal processing, signal watermark embedding and extraction, EMG signal, EEG signal, signal timing optimization
7 Power system aspects
Microgrid optimization, reactive power optimization, distribution network reconstruction, energy storage configuration
8 Cellular Automata
Traffic flow, crowd evacuation, virus spread, crystal growth
9 Radar aspect
Kalman filter tracking, track correlation, track fusion