Specific embodiment
Carry out detailed description of the present invention illustrative embodiments with reference to the drawings.It should be appreciated that shown in attached drawing and
The embodiment of description is only exemplary, it is intended that is illustrated the principle and spirit of the invention, and is not limited model of the invention
It encloses.
The PCB hardware security detection method based on temperature field-effect that the embodiment of the invention provides a kind of, as shown in Figure 1,
Include the following steps S1-S8:
S1, multiple pcb boards for having the pcb board distorted and nothing to distort are chosen as training pcb board, composing training collection.
S2, temperature value acquisition is carried out to each pcb board of training set, obtains the temperature thermal map matrix of each pcb board of training set.
S3,2DPCA two-dimensional principal component analysis is carried out to the temperature thermal map matrix of each pcb board in training set, is trained
Concentrate two norm matrixes of each pcb board temperature value.To the temperature thermal map matrixes of all trained pcb boards carry out 2DPCA two dimension it is main at
Analysis, its purpose is to make feature more obvious, it is easier to be distinguished out.
Step S3 includes following S31-S35 step by step:
S31, the temperature thermal map matrix D according to pcb board each in training setiCalculate covariance matrix G, calculation formula are as follows:
Wherein K is the quantity of pcb board in training set,For the temperature thermal map matrix D of pcb board each in training setiBe averaged
Value, the transposition of subscript T representing matrix.
S32, the corresponding feature vector of maximum P characteristic value in covariance matrix G is chosen;The determination formula of P value are as follows:
WhereinIndicate the characteristic value of covariance matrix G a column, a ∈ (1,2 ..., N), N are temperature thermal map matrix Di's
Columns.In the embodiment of the present invention, each plank has the temperature value for measuring and acquiring on 1296 points altogether, then N=36, i.e. matrix Di
For one 36 × 36 temperature value matrix.
S33, descending sort is carried out to feature vector according to the corresponding characteristic value size of P feature vector selected, obtained
To best projection axis XO:
WhereinIndicate k-th of feature vector after sorting, k ∈ (1,2 ..., P).
S34, according to best projection axis XOCalculate the eigenmatrix F of each pcb board in training seti, calculation formula are as follows:
Fi=DiXO (4)
Wherein i ∈ (1,2 ..., K).
S35, eigenmatrix F is calculatediIn each column vector two norms, obtain two norm matrix Ls of each trained pcb boardi:
WhereinIndicate eigenmatrix FiIn j-th of column vector two norms, calculation formula are as follows:
Wherein Fi jIndicate eigenmatrix FiJth column, j ∈ (1,2 ..., Q), Q is characterized matrix FiColumns.
Due to original temperature thermal map matrix DiFor a three-dimensional matrice, and obtained after 2DPCA two-dimensional principal component analysis
Two norm matrix LsiFor a two-dimensional matrix, therefore the matrix after 2DPCA two-dimensional principal component analysis easily facilitates differentiation.
S4, SOM neural network is trained according to two norm matrixes of pcb board temperature value each in training set, is instructed
The SOM neural network perfected.In the embodiment of the present invention, rule is found to input data using SOM unsupervised neural network and is returned
Class realizes in the class of input data separation property between similitude and class.
Step S4 includes following S41-S46 step by step:
S41, the two norm matrix Ls to pcb board each in training setiIt is normalized and random ordering is handled, obtain input number
According to X={ xn, n=1 ..., D }, D is the dimension of input data.In the embodiment of the present invention, D=3.
The node weights w of S42, random initializtion SOM neural network topology structurebnAnd its weighted error Δ wbn, wherein wbn
Indicate the n-th dimensional weight vector of b-th of node of SOM neural network.
The most matched node of S43, selection and input data X is as activation node I (X).
In the embodiment of the present invention, due to being unsupervised mode, do not have for the vector of one group of input desired defeated
Outgoing label can only carry out cluster classification by similitude, and similitude is usually exactly to be distinguished by the measurement of distance
, commonly used range measurement is Euclidean distance, therefore using Euclidean distance as discriminant function, calculates each
The Euclidean distance d of node b and input data Xb(X):
Select Euclidean distance db(X) the smallest node of value is made as with the most matched node of input data X
To activate node I (X).
S44, the weight for updating activation node I (X), more new formula are as follows:
Wherein Tm,I(X)Indicate the weight of activation node I (X), Sm,I(X)Indicate activation node I (X) adjacent node m it
Between distance, σ be activate node I (X) neighborhood size.
S45, according to the weight T of the currently active node I (X)m,I(X), update weighted error, more new formula are as follows:
Δwmn=η (t) Tm,I(X)·(xn-wmn) (8)
Wherein wmnIndicate the n-th dimensional weight vector of node m, Δ wmnFor its weighted error, η (t) is SOM neural network
Learning rate.
S46, judge whether iteration restrains, if then obtaining updated SOM neural network, and enter step S47, otherwise
Return step S43 carries out next iteration training.
In the embodiment of the present invention, the condition of iteration convergence are as follows:
Weighted error Δ wmnReach pre-set error threshold or the number of iterations reaches pre-set the number of iterations
Threshold value.In the embodiment of the present invention, the number of iterations threshold value needs to be arranged enough to big.
S47, after the temperature thermal map matrix of standard gold pcb board is carried out 2DPCA two-dimensional principal component analysis, it is input to update
SOM neural network afterwards distinguishes no tampering class pcb board and has tampering class pcb board, obtains trained SOM neural network.
2DPCA and SOM nerve is carried out by temperature thermal map matrix of the step S3 and S41~S46 to each pcb board of training set
After network analysis, each pcb board temperature thermal map matrix of training set can be divided into two classes, but by then passing through Unsupervised clustering analysis
Obtained classification, cannot be distinguished specific classification, (i.e. which kind of is no tampering class pcb board, which kind of is that have tampering class PCB
Plate), therefore also need the temperature thermal map matrix of standard gold pcb board carrying out 2DPCA two dimension principal component in the embodiment of the present invention
After analysis, it is input to updated SOM neural network, distinguish no tampering class pcb board and has tampering class pcb board, is trained
Good SOM neural network.
S5, multiple pcb boards to be measured are chosen, constitutes test set.
S6, temperature value acquisition is carried out to the pcb board to be measured in test set, obtains the temperature thermal map matrix of each pcb board to be measured.
S7,2DPCA two-dimensional principal component analysis is carried out to the temperature thermal map matrix of all pcb boards to be measured, it is each obtains test set
Two norm matrixes of pcb board temperature value.2DPCA two-dimensional principal component analysis is carried out to the temperature thermal map matrix of all pcb boards to be measured,
Its purpose is to make feature more obvious, it is easier to be distinguished out.
In the embodiment of the present invention, step S7 uses method identical with step S3, specifically, step S7 includes following point
Step S71-S75:
S71, the temperature thermal map matrix A according to each pcb board to be measuredlCalculate covariance matrix G ', calculation formula are as follows:
Wherein H is the quantity of pcb board to be measured,For the temperature thermal map matrix A of each pcb board to be measuredlAverage value, subscript T
The transposition of representing matrix.
S72, the corresponding feature vector of maximum R characteristic value in covariance matrix G ' is chosen;The determination formula of R value are as follows:
WhereinIndicate the characteristic value of c column in covariance matrix G ', c ∈ (1,2 ..., M), M are temperature thermal map matrix
AlColumns.
S73, descending sort is carried out to feature vector according to the corresponding characteristic value size of R feature vector selected, obtained
To best projection axis X 'O:
WhereinIndicate h-th of feature vector after sorting, h ∈ (1,2 ..., R).
S74, according to best projection axis X 'OCalculate the eigenmatrix F of each pcb board to be measuredl, calculation formula are as follows:
Fl=AlX′O (13)
Wherein l ∈ (1,2 ..., H).
S75, eigenmatrix F is calculatedlIn each column vector two norms, obtain two norm matrix Ls of each pcb board to be measuredl:
WhereinIndicate eigenmatrix FlIn d-th of column vector two norms, calculation formula are as follows:
Wherein Fl dIndicate eigenmatrix FlD column, d ∈ (1,2 ..., V), V is characterized matrix FlColumns.
S8, it is identified using two norm matrixes of the trained SOM neural network to each pcb board temperature value of test set,
Judge whether each pcb board to be measured is distorted, completes the safety detection to PCB hardware.
By step S47, no tampering class pcb board has been distinguished in trained SOM neural network and has had tampering class
Pcb board can be detected out then by after the trained SOM neural network of two norm Input matrixes of each pcb board temperature value of test set
Whether each pcb board to be measured is distorted.
In the embodiment of the present invention, it is necessary first to two norm matrix Ls of each pcb board to be measuredlIt is normalized and out-of-order
Processing, the Input matrix then obtained trained SOM neural network, goes out temperature thermal map by neural network recognization
In include distort information, finally determine whether each pcb board to be measured is distorted.
Detection effect of the invention is described in detail with a specific embodiment below:
The PCB hardware security detection method based on temperature field-effect provided according to the present invention usurps nothing using MATLAB
Change PCB and carry out the PCB that different type is distorted and is detected.
In the embodiment of the present invention, the pcb board detected is that a cutoff frequency is 2KHZ, the low pass that voltage gain is 2
Filter plate, as shown in Figure 2.The plate figure of the pcb board as shown in figure 3, pcb board standard size are as follows: 15.24cm × 10.16cm
×0.392mm.Due to not using via hole on normal pcb board, also need to add the detection that via hole carries out via hole size,
The plate figure of via hole is added to as shown in figure 4, the point of addition of via hole is near GND network.
Need to add the various parameters in pcb board random manufacturing error, the mode of error addition in the embodiment of the present invention
As shown in table 1.
Table 1
The error that table 1 will appear primarily with respect to each parameter of the plate mill in practice when manufacturing dual platen on plank
Always there are some foozles in the fabrication process in tolerance values, during the test take into account these random noises
It goes, can more meet practical situation, obtained testing result can be closer to actual result.
In the embodiment of the present invention, what difference distorted type distorts that mode is as shown in table 2, and testing result is as shown in table 3.
Due to mainly detecting to distorting for pcb board in invention, and table 2 is to low-pass filter shown in Fig. 2
The actual conditions of PCB modification, the normal pcb board situation that the data that do not distort are not distorted mainly, each data after distorting are main
It is the data situation specifically distorted, the type to be distorted only is distorted when distorting every time, component is selected
Value be actual common component values, and with the data do not distorted very close to value, can be become apparent from by table 2
Find out which the present invention mainly distort type and detect to.
Table 2
Table 3
Table 3 is the corresponding testing result respectively distorting type and obtaining of table 2, by testing result it can be found that for component with
And it is relatively high for covering the accuracy for the detection of copper face product distorted.Testing result in the embodiment of the present invention is based on 560 groups
What above sample obtained, without distorted and carried out component, cover copper face product and when distorting of trace width,
There is plate thickness error and has carried out 30 groups of training samples, 18 groups of test samples without plate thickness error.The presence or absence of via hole size is usurped
Change 20 groups of training samples, 12 groups of test samples.Last testing result is shown, distorts and cover copper face product for component values
Distort can accurate detection come out.It is by the data in table 3 it is found that provided in an embodiment of the present invention based on temperature field-effect
The verification and measurement ratio that PCB hardware security detection method obtains is higher, and be suitable on PCB various types of physical distorts.
Those of ordinary skill in the art will understand that the embodiments described herein, which is to help reader, understands this hair
Bright principle, it should be understood that protection scope of the present invention is not limited to such specific embodiments and embodiments.This field
Those of ordinary skill disclosed the technical disclosures can make according to the present invention and various not depart from the other each of essence of the invention
The specific variations and combinations of kind, these variations and combinations are still within the scope of the present invention.