基于simulink的uwb仿真
uwb.mdl: UWB model - open this to Begin.
uwb_lib.mdl: Library blocks for UWB model.
uwb_init.m: Initialization called before model is loaded.
uwb_settings: Sets up structure containing system parameters ( uwb in workspace).
uwb_imr.m: Initializes UWB channel impulse response.
uwb_sv_*.m: Four M-files used to generate channel impulse responses (MAT files).
Procedure TSPSA:
Begin
init-of-T { T為初始溫度}
S={1,……,n} {S為初始值}
termination=false
while termination=false
Begin
for i=1 to L do
Begin
generate(S′form S) { 從當(dāng)前回路S產(chǎn)生新回路S′}
Δt:=f(S′))-f(S) {f(S)為路徑總長(zhǎng)}
IF(Δt<0) OR (EXP(-Δt/T)>Random-of-[0,1])
S=S′
IF the-halt-condition-is-TRUE THEN
termination=true
End
T_lower
End
End
DATA:Begin OF HEADDATA.
INCLUDE STRUCTURE BAPIMATHEAD.
DATA:END OF HEADDATA.
DATA:Begin OF PLANTDATA.
INCLUDE STRUCTURE BAPI_MARC.
DATA:END OF PLANTDATA.
DATA:Begin OF PLANTDATAX.
INCLUDE STRUCTURE BAPI_MARCX.
DATA:END OF PLANTDATAX.
READ TABLE XMKPF INDEX 1.
IF XMKPF-TCODE2 = MIGO_GR .
LOOP AT XMSEG.
How the K-mean Cluster work
Step 1. Begin with a decision the value of k = number of clusters
Step 2. Put any initial partition that classifies the data into k clusters. You may assign the training samples randomly, or systematically as the following:
Take the first k training sample as single-element clusters
Assign each of the remaining (N-k) training sample to the cluster with the nearest centroid. After each assignment, recomputed the centroid of the gaining cluster.
Step 3 . Take each sample in sequence and compute its distance from the centroid of each of the clusters. If a sample is not currently in the cluster with the closest centroid, switch this sample to that cluster and update the centroid of the cluster gaining the new sample and the cluster losing the sample.
Step 4 . Repeat step 3 until convergence is achieved, that is until a pass through the training sample causes no new assignments.