1 Introduction

Chaos phenomenon is a random phenomenon in a certain system. Modeling, prediction and control of chaotic system has become a hot topic. The state of chaos system builds the model of chaos. Its methods include global prediction, locality predication and adaptive prediction. Neural network is an effective tool for approximation and modeling of nonlinear system. It not only achieves global prediction, but realizes the local prediction. Many researchers have studied the model of chaos using neural network [5, 6, 12].

Wang et al. [10] employed linear matrix inequality and particle swarm optimization based on cellular neural networks. Among these templates obtained by using linear matrix inequality, it utilized the PSO to carry out the optimization parameters. (Jiang et al., 2014) represented that fault diagnosis based on fuzzy neural network and chaos theory could solve uncertain problem essentially, moreover, it was easy to understand and the system features was easy to maintain. Therefore, it was an effective method to diagnose complex system. Wang et al. [10] proposed a hybrid method comprising a chaos synchronization (CS)-based detection scheme and an extension neural network classification algorithm for power quality monitoring and analysis. The new method could detect minor changes in signals of the power systems. Chatzinakos et al. [1] proposed that a member of a time series could be optimally expressed as a deterministic function of the d past series values, where d is the dimension of the system. A new algorithm was for the estimation of the dimension of chaotic dynamical systems using neural networks and robust location estimate. Therefore, this article uses the BP neural network prediction model which has strong of ability of nonlinear fitting. But this model has the slow convergence speed and low prediction accuracy.

PSO is an effective global optimization algorithm which generates swarm intelligence optimization search by cooperation and competition between particles in the group. So we adopt PSO algorithm to optimize BP neural network. The algorithm divides particles into two parts according to the fitness value. Fitness value can measure the particles mass. By comparing the fitness value of individual particle and average fitness value of particle group, it can distinguishes the merits of particle mass. Also it reasonably adjusts the global searching ability and self-learning ability, social learning ability which is conducive to the rapid convergence of particle swarm. Using particle swarm algorithm optimizes initial weight and threshold of BP neural network. We can get better initial weight and threshold and pass it to the BP neural network. BP neural network will train and predict it. First, PSO uses improved adaptive acceleration factor and improved adaptive inertia weight to improve the initial weight value and threshold value of BP neural network. Second, This paper’s new algorithm uses improved PSO to optimize BP neural network’s initial weight value and threshold value. Finally, we conduct experiments to verify its feasibility. The follows are the structures of this paper. Section 2 is some basic knowledge about BP neural network and phase-space reconstruction. Section3 is multimedia course-ware evaluation model based on BP neural network. Section 4 introduces the PSO algorithm. Section 5 represents the improved scheme. Section 6 makes simulation and analysis. The conclusions are drawn in section 7.

2 BP neural network and phase-space reconstruction

Phase-space reconstruction [3, 9] is foundation of chaos theory. Setting X is the observed chaotic time series. x(t), t = 1,2,3……n. Based on Takens theory, it conducts phase-space reconstruction. In the state space, after reconstructing the state vector can be shown as:

$$ {X}_i{\left({x}_i,{x}_{i+\omega },\dots \dots, {x}_{i+\left(m-1\right)\omega}\right)}^T,i=1,2,3\dots \dots M $$

M = n − (m − 1)ω is the number of phase point in phase space. ω is delay time. m is the number of embedded dimension. Takens found a suitable m, m ≥ 2d + 1, d is the dimensions of the power system, which can recover attractor. In the reconstruction space R m, prime mover system maintain differential homeomorphism, thus it lays a solid theoretical basis for the prediction of chaotic time series.

In essence, prediction of chaotic time series is a reverse problem, it re-factors dynamic model of system through the state of dynamic system. The BP neural network [2, 13] has strong ability of nonlinear fitting, which is a good method to construct chaotic time series nonlinear prediction model. Typical three layer BP neural network is composed of input layer, hidden layer and output layer. Its main principle is that BP neural network transmits error and rectifies the error at the same time to adjust the weights and threshold of network and realize or approximate the input and output mapping relationship. Using three layers BP neural network to predict chaotic time series, the number of input layer neurons can select m which is equal to embedded dimension. The number of hidden layer neurons mostly relies on experience to choose, here it is p. Output layer neuron number is 1. and f . R m → R 1. The function of BP neural network is Sigmoid, its output is linear unit.

The input of hidden layer nodes is:

$$ {S}_j={\displaystyle \sum_{i=1}^m{w}_{ij}{x}_i-{\theta}_j,j=1,2,\dots \dots, p} $$

Where x i state vector. w ij is connecting weight between input layer and hidden layer. θ j is threshold of hidden layer nodes.

The output of hidden layer nodes is:

$$ {b}_j=\frac{1}{1+{e}^{\theta_j-{\displaystyle \sum_{i=1}^m{w}_{ij}{x}_i+{\theta}_j}}},j=1,2,\dots \dots, p $$

The input of output layer nodes is:

$$ L={\displaystyle \sum_{j=1}^p{v}_j{b}_j-\gamma } $$

Where v j is connecting weight between output layer and hidden layer. γ is threshold of output layer nodes.

The output of output layer nodes is:

$$ {x}_{i+1}=\frac{1}{1+{e}^{\gamma -{\displaystyle \sum_{j=1}^p{v}_j{b}_i}}} $$

Inputting the chaos time series and training the BP neural network, it will get trained network, and then makes predictions. Before starting work, however, each layer connection weights and threshold values of the BP neural network are randomly initialized, which can reduce the convergence speed and accuracy of BP neural network and makes it easy to fall into local minimum value. Using PSO algorithm can optimize the initial weights and thresholds, the optimized initial weights and thresholds ensure that the BP neural network has better convergence speed and higher prediction precision. BP neural network structure is as Fig. 1.

Fig. 1
figure 1

The structure of BP neural network

3 PSO algorithm

First, PSO algorithm produces initial solution. It initializes N particles to form group randomly in the D-dimension feasible solution space. z = {z 1, z 2,  … , z N }. Each particle has two position vectors and speed vectors: z = {z i1, z i2,  … , z iN }and v = {v i1, v i2, …v iN }. Then it uses objective function to calculate fitness value of particles and iteratively searches in the S-dimension solution space. When iterating algorithm, particle will track two extreme value (one is the best solution p id searched by particle itself , one is the best solution p gd searched by group) to update itself. Every particle updates its speed and position by the following:

$$ {v}_{id}\left(t+1\right)=\eta {v}_{id}(t)+{a}_1{r}_1\left[{p}_{id}-{z}_{id}(t)\right]+{a}_2{r}_2\left[{p}_{gd}-{z}_{id}(t)\right] $$
(1)
$$ {z}_{id}\left(t+1\right)={z}_{id}(t)+{v}_{id}\left(t+1\right) $$
(2)

Where η is weight. a 1 and a 2 are acceleration constant. 0 ≤ r 1 , r 2 ≤ 1 are random number. v id (t + 1) is i-th particle’s d-dimension speed in the t + 1-th iteration.

Linear descend inertia weight η is:

$$ \eta ={\eta}_{\max }-\frac{\eta_{\max }-{\eta}_{\min }}{ite{r}_{\max }}\times iter $$
(3)

Where iter is current iteration’s number. iter max is maximum iteration’s number. η maxis initial inertia weight value. η min is final inertia weight value.

η changing completely dependents on the iter and iter max. In later iterations, its convergence rate is slow. It is difficult to jump out of local optimal solution. Since the particles are based on their own experience and the experience of all the particles in the optimal solution direction, under the larger study factor, particle is likely to miss the optimal solution, so that the convergence is slow. In addition, when the algorithm starts convergence, all the particles search solution in the direction of optimal solution. Particles in the group tend to accordance and lose the diversity of solution which reduces the convergence speed and accuracy of algorithm.

4 Multimedia course-ware evaluation model based on BP neural network

Multimedia course-ware is a huge nonlinear system, the relation of influence factors is very complex. Course-ware evaluation, however, is based on a large number of “experience” of original data, so BP network can better meet the needs of evaluation and represent the intrinsic essence of the course-ware. The following will introduce the process of evaluating.

When evaluating the quality of multimedia course-ware, the qualitative index information will be quantitatively conducted and transformed into input vector of neural network T = {t 1, t 2,  … , t n }. Comprehensive evaluation value obtained by expert will be conducted Fuzzy processing and it will get \( Y=\left\{{\mu}_{S_1},{\mu}_{S_2},\dots, {\mu}_{S_n}\right\} \) as the output of neural network. Then it uses enough sample set to train network, through repeated iteration, gets stable training results. At this time, weight value W ij and threshold θ is the correct expression through adaptive learning. And the training results will regarded as knowledge base to evaluate the multimedia course-ware.

  • Step1. Determining learning parameters. Supposing expected minimum error value is err goal , maximum iteration is max epoch . Learning rate of amending the weight is lr ranging from 0.01 to 0.7.

  • Step2. Network initialization. Using smaller random number initializes the network weights W ij and V jk , threshold value θ j and r k .

  • Step3. Inputting training set. Supposing input vector of k samples is \( {t}_k={\left({T}_1^k,{T}_2^k,\dots, {T}_n^k\right)}^T \) and output vector of expected value is \( {y}_k={\left({Y}_1^k,{Y}_2^k,\dots, {Y}_n^k\right)}^T \).

  • Step4. Calculating network output of each layer. Using \( {t}_k={\left({T}_1^k,{T}_2^k,\dots, {T}_n^k\right)}^T \), W ij and θ j calculates each neuron of middle layer input : \( {U}_j={\displaystyle \sum_{i=1}^n{W}_{ij}{t}_i+{\theta}_j} \). Then it adopts activation function f(x) = 1/(1 + e x) to calculate the real output (H j  = f(U j )) of each neuron in middle layer. And it will compute the input value \( {S}_k={\displaystyle \sum_{j=1}^p{V}_{jk}{H}_j+{r}_k} \) (p is node number of hidden layers) in the output layer and the corresponding output values O k  = f(S k ).

  • Step5. Calculating training error. It calculates the error of output layer weights δ k  = (O k  − y k ) ⋅ (1 − O k ) ⋅ O k and the error of middle layer weights \( {\sigma}_j={H}_j\cdot \left(1-{H}_j\right)\cdot {\displaystyle \sum_{k=1}^q{\delta}_k{V}_{jk}} \) (q is output layer node number).

  • Step6. Correcting weights and thresholds of output layer and hidden layer. a is weight adjustment parameters, 0 < a < 1; η is learning coefficient, 0 < η < 1.

V jk  = V jk  +  k H j , r k  = r k  +  k , W ji  = W ji  + ησ j t i , θ j  = θ j  + ησ j

  • Step7. Entering the next learning mode. Return step3 to iterate. Until the error is less than the set minimum error value err goal or leaning number is more than max epoch , the training stops. And evaluation model is built.

5 Improved PSO algorithm

5.1 Improved PSO based on chaos

Chaotic time series has randomness, ergodicity and regularity. Tang et al. [8] combines particle swarm optimization algorithm with chaos and multi-agent system, it is applied to reactive power optimization of power system. It synthesizes advantages of the swarm search of PSO and the intelligent search of agents. She et al. [7] represents that dynamic chaos particle swarm optimization is the improvement of the standard PSO algorithm, is used to optimize the multi-objective optimized mathematical model of elevator configuration. So this paper proposes a new PSO algorithm based on chaos. In this scheme, it uses adaptive control particle’s search capability ω and learning ability c 1, c2 to jump out of local optimum. Algorithm adopts typical Logistic chaotic time series.

$$ {x}_{i+1}=\mu {x}_i\left(1-{x}_i\right),\mu =4 $$
(4)

The algorithm divides particles into two parts according to the fitness value. Fitness value can measure the particles mass. By comparing the fitness value of individual particle and average fitness value of particle group, it can distinguishes the merits of particle mass. Also it reasonably adjusts the ω and c 1, c 2 which is conducive to the rapid convergence of particle swarm.

$$ \left\{\begin{array}{l}\omega ={\omega}_0+{k}_1\cdot \mu \cdot x\left(1-x\right)\\ {}c={c}_{10}-{k}_2\cdot \mu \cdot x\left(1-x\right),f>{f}_{avg}\\ {}{c}_2={c}_{20}+{k}_3\cdot \mu \cdot x\left(1-x\right)\end{array}\right. $$
(5)
$$ \left\{\begin{array}{l}\omega ={\omega}_0+{k}_1\cdot \mu \cdot x\left(1-x\right)\\ {}c={c}_{10}-{k}_2\cdot \mu \cdot x\left(1-x\right),f>{f}_{avg}\\ {}{c}_2={c}_{20}+{k}_3\cdot \mu \cdot x\left(1-x\right)\end{array}\right. $$
(6)

Where 0 < ω 0 < 1, 1 < c 10 < 2, 1 < c 20 < 2, 0 < k 1 , k 2 , k 3 < 1 μ = 4. 0 < x < 1, f is i-th particle’s fitness value. f avg is all particles’ average fitness value.

When f > f avg , particle’s quality is poor. Equation (5) reduces self-learning ability c 1 by enhancing global searching ability ω and social learning ability c 2. So the particle’s quality will be improved. When f < f avg , particle’s quality is better. Equation (6) reduces social learning ability c 2by enhancing global searching abilityωand self-learning ability c 1. So it will protect particles with better quality and solution diversity.

5.2 Improved PSO for BP neural network

Using particle swarm algorithm optimizes initial weight and threshold of BP neural network. We can get better initial weight and threshold and pass it to the BP neural network. BP neural network will train and predict it. The detailed processes are as following:

  • Step1. Initializing particle swarm parameters, population size, iteration number, learning factor, range of speed and position.

  • Step2. Building the topological structure of BP neural network, generating particle swarm and initializing the particle’s position and speed randomly.

$$ {z}_i=\left\{{z}_{i1},{z}_{i2},\cdot \cdot \cdot, {z}_{is}\right\},{v}_i=\left\{{z}_{i1},{z}_{i2},\cdot \cdot \cdot, {z}_{is}\right\},i=1,2\cdot \cdot \cdot s=R\times {s}_1+s+{s}_2 $$
(7)

Where s is dimension of the particle, R is input layer node number. s 1 is hidden layer node number. s 2 is output layer node number.

  • Step3. Calculating fitness value of particle, the fitness value of i-th particle is:

$$ f(i)={{\displaystyle \sum_{i=1}^n\left({y}_k-{\overline{y}}_k\right)}}^2,i=1,2,\dots, N $$
(8)

Where n is training sample number, N is population size.

We calculate fitness value of each particle and set the current position as the optimal position p id , set the optimal particle in the population as the global optimal position p gd .

  • Step4. Using [4, 11] to update ω ,  c 1 ,  c 2 and [5, 12] to update position and speed of particle. After the above process, we calculate the fitness value of new particle. Then we update the individual extremum and group extremum according to the fitness value.

  • Step5. When the iteration number is less than maximum iteration number, return to step4, otherwise exit the particle optimization algorithm. We get the optimal particle and pass it to the connection weight and threshold of BP neural network.

6 Simulation experiments and analysis

Example1

Under the MATLAB platform, we make experiments to compare improved PSO and PSO. We select 800 data to analysis (for the reason that at 400 s, it changes movement direction, we re-record its values at 401 s). In the simulation experiments, we suppose that prediction performance index is error e, root mean square error E rmse and relative error err ,  y is target value, \( \widehat{y} \)is prediction value.

$$ e={y}_k-{\widehat{y}}_k $$
(9)
$$ {E}_{rmse}={\left(\frac{1}{N}{\displaystyle \sum_{k=1}^N\Big(}{y}_k-{\widehat{y}}_k\right)}^2\Big){}^{1/2} $$
(10)
$$ err=\Big[{\displaystyle \sum_{i=1}^N{\left({y}_i-{\widehat{y}}_i\right)}^2\left]/\right[{\displaystyle \sum_{i=1}^N{y}_1^2\Big]}} $$
(11)

For the traditional PSO, we set the training number 800, learning rate 0.01, population size 30, evolutional generation 100, accelerated factor c 1 = c 2 = 2. The range of position and speed is [−5,5] and [−1,1] respectively.

For the improved PSO, we set training number 800, learning rate 0.01, population size 30, evolutional generation 100, c 10 = c 20 = 1.6, k 1 = 0.3, k 2 = k 3 = 0.5. Range of inertia weight and accelerating factor is [0.2,0.9] and [1.2,2.4] respectively. Range of particle position and speed is [−5,5] and [−1,1] respectively. We use these data to make experiments and get Figs. 2 and 3.

Fig. 2
figure 2

Measurement value n ≤ 400

Fig. 3
figure 3

Measurement value 400 ≤ n ≤ 800

From Figs. 2 and 3, we can know that the improved PSO is much closer to the true value. We select the same experiments parameter. The convergence speed of improved PSO is faster than PSO algorithm.

Figs. 4 and 5 are the prediction error. The error of improved PSO is small than PSO algorithm. The smaller the fitness value is, the better the quality of the particles is (as Figs. 6 and 7). The initial weight and threshold are more conducive to the BP neural network training. BP neural network has fast convergence with good initial weight and threshold. It will improve the prediction accuracy and reduce the BP neural network to fall into a minimal value. From the above results, we can conclude that improved PSO is conducive to globally optimized solution.

Fig. 4
figure 4

Error n ≤ 400

Fig. 5
figure 5

Error 400 ≤ n ≤ 800

Fig. 6
figure 6

Fitness value n ≤ 400

Fig. 7
figure 7

Fitness value 400 ≤ n ≤ 800

Also we use PSO and improved PSO to predict chaotic system (Lorenz) at the same condition of physical. We get figs. 8 and 9. From this two figures, we can obtain that improved PSO are very precise prediction and has low error than PSO method.

Fig. 8
figure 8

PSO prediction and its error

Fig. 9
figure 9

Improved PSO prediction and its error

Example 2

Selecting fifteen typical course-wares as the evaluation objects. Experts give evaluation interval for index effectiveness and course-ware integrated level for each course-ware. The evaluation basis is as follows: bad [0,0.55], pass [0.55,0.7], good [0.7,0.85], excellent [0.85,1]. We get a sample data as Table 1. And it calculates \( Y=\left\{{\mu}_{S_1},{\mu}_{S_2},\dots, {\mu}_{S_n}\right\} \) as output data represented in Table 2. The former 10 data is as training set and the later 5 data is as testing set.

Table 1 Sample input data
Table 2 Sample output data

Table 2. shows that network training is successful, the error is small, and it can accurately evaluate the quality of multimedia course-ware for students.

7 Conclusions

This paper’s aim is to perfect the convergence speed, accuracy of algorithm and to solve the problem with Local minimum shortage and slow convergence speed in BP neural network. Also we finally build multimedia course-ware evaluation model based on the improved PSO. First, we give a detailed explanation on BP neural network and phase-space reconstruction. Multimedia course-ware evaluation model based on BP neural network is further illustrated. Then we propose improved PSO to optimize the initial weight and threshold value. Compared with the traditional PSO, the convergence speed of improved PSO becomes faster. It will add the probability of jumping out of local optimal solution and it is conducive to find the global optimal solution. This paper makes experiments with chaos system to verify the superiority of improved PSO. The new scheme improves convergence speed and prediction accuracy and reduces the probability of falling into local value with BP neural network. Multimedia course-ware evaluation model is well improved, which is conducive to valuating multimedia course-ware in some universities. In the future, we will study the advanced PSO algorithm based on this paper’s method to solve the accuracy and convergence speed problem.