一、获取代码方式

获取代码方式1:
完整代码已上传我的资源:【数字信号去噪】基于matlab同心兰姆波模式分解【含Matlab源码 679期】

获取代码方式2:
通过订阅紫极神光博客付费专栏,凭支付凭证,私信博主,可获得此代码。

备注:
订阅紫极神光博客付费专栏,可免费获得1份代码(有效期为订阅日起,三天内有效);

二、部分源代码

%% Parameters
clear; clc; close all; format shortg; warning off;%% Setup folders
folderDataExp       = fullfile(cd(cd('..')),'data','exp');%% Load raw signals
% CH0 : Dual PZT A
% CH1 : Dual PZT B
% CH2 : Dual PZT D
% CH3 : Dual PZT C
%
% The channel order is that only dual PZTs A, B, and D are used
% for the proposed technique, which are installed on a single side. Dual
% PZT C (CH3) is installed to validate decomposition results.% AB_F{i,j} indicates excitation at dual PZT A and sensing at dual PZT B.
% i and j denote the different part(s) of the dual PZT activated for
% excitation and sensing. 1, 2, and 3 represent the entire, ring and
% circular parts of the dual PZT, respectively. For example, AB_F13 means
% the response signals measured at the circular part of the dual PZT B when
% both ring and circular part of dual PZT A is actuated.% Notations are defined in similar fashion in case of FEM simulation.
% The raw signals are stored in AB_F, AD_F, CB_F and CD_F.AB_F = cell(3,3);AD_F = cell(3,3);
CB_F = cell(3,3);CD_F = cell(3,3);
for ii=1:3for jj=1:3AB = ['180k_CH0CH1_F' int2str(ii) int2str(jj)];AD = ['180k_CH0CH2_F' int2str(ii) int2str(jj)];CB = ['180k_CH3CH1_F' int2str(ii) int2str(jj)];CD = ['180k_CH3CH2_F' int2str(ii) int2str(jj)];load(fullfile(folderDataExp,AB));load(fullfile(folderDataExp,AD));load(fullfile(folderDataExp,CB));load(fullfile(folderDataExp,CD));AB_F{ii,jj} = eval(['transpose(X' AB ');']);AD_F{ii,jj} = eval(['transpose(X' AD ');']);CB_F{ii,jj} = eval(['transpose(X' CB ');']);CD_F{ii,jj} = eval(['transpose(X' CD ');']);end
end; clearvars -except AB_F AD_F CB_F CD_F;%% Decomposition of S0 and A0 mode signals using collocate dual PZTs
% These are considered as reference (ground-truth).% In Section 3.2, S0 and A0 mode signals are obatined by adding and
% subtracting respones from dual PZTs B and C, respectively. (Please refer
% the following paper : S.B. Kim, H. Sohn, Instantaneous reference-free
% crack detection based on polarization characteristics of piezoelectric
% materials, Smart Mater. Struct. 16 (2007) 2375?387.% S0_D_F_Col: S0 mode extracted from a signal measured between path AD
% using collocated PZTs
% A0_D_F_Col: A0 mode extracted from a signal measured between path AD
% using collocated PZTs
S0_D_F_Col = cellfun(@(x,y) plus(x,y)/2,  AD_F, CD_F,'UniformOutput',0);
A0_D_F_Col = cellfun(@(x,y) minus(x,y)/2, AD_F, CD_F,'UniformOutput',0);% S0_B_F_Col: S0 mode extracted from a signal measured between path AB
% using collocated PZTs
% A0_B_F_Col: A0 mode extracted from a signal measured between path AB
% using collocated PZTs
S0_B_F_Col = cellfun(@(x,y) plus(x,y)/2,  AB_F, CB_F,'UniformOutput',0);
A0_B_F_Col = cellfun(@(x,y) minus(x,y)/2, AB_F, CB_F,'UniformOutput',0);%% Decomposition of S0 and A0 mode at path AD using the proposed method
S0_range = 5000:5600;
A0_range = 5600:5900;[~, S_LOC] = cellfun(@(x) max(x(S0_range)),AD_F);
[~, A_LOC] = cellfun(@(x) max(x(A0_range)),AD_F);% scaling factor obtained from experiment signals
scaleFact_S_AD = cellfun(@(x,y) x(y),AD_F,num2cell(S_LOC+S0_range(1)-1));
scaleFact_A_AD = cellfun(@(x,y) x(y),AD_F,num2cell(A_LOC+A0_range(1)-1));scalingMatrix_AD_MD  = [reshape(scaleFact_S_AD,9,1)/scaleFact_S_AD(1) ...reshape(scaleFact_A_AD,9,1)/scaleFact_A_AD(1)];% S0 and A0 modes can be reconstred by mutiplying scaling factors and
% common factors Ms = S11*C(1) for S0 mode and Ma = A11*C(2) for A0 mode.
% We know V matrix (signal matrix) and scaling matrix (scaled with S11 and
% A11) so we can compute common factor Ms and Ma. Please see eq.(7).
inv_S_AD    = pinv(scalingMatrix_AD_MD);
Ms_AD       = inv_S_AD(1,:) * cell2mat(reshape(AD_F,9,1));
Ma_AD       = inv_S_AD(2,:) * cell2mat(reshape(AD_F,9,1));% S0 and A0 mode extracted using the proposed mode decomposition method
S0_D_F_MD = cellfun(@(x,y) x*y, repmat({Ms_AD},3,3), ...num2cell(reshape(scalingMatrix_AD_MD(:,1),3,3)), ...'UniformOutput',0);
A0_D_F_MD = cellfun(@(x,y) x*y, repmat({Ma_AD},3,3), ...num2cell(reshape(scalingMatrix_AD_MD(:,2),3,3)), ...'UniformOutput',0);clearvars S_LOC A_LOC scaleFact_S_AD scaleFact_A_AD S0_range A0_range
clearvars inv_S_AD Ms_AD Ma_AD%% Decomposition of S0 and A0 mode at path AD using the proposed method
inv_S_AB    = pinv(scalingMatrix_AD_MD);
Ms_AB       = inv_S_AB(1,:) * cell2mat(reshape(AB_F,9,1));
Ma_AB       = inv_S_AB(2,:) * cell2mat(reshape(AB_F,9,1));S0_B_F_MD = cellfun(@(x,y) x*y, repmat({Ms_AB},3,3), ...num2cell(reshape(scalingMatrix_AD_MD(:,1),3,3)), ...'UniformOutput',0);
A0_B_F_MD = cellfun(@(x,y) x*y, repmat({Ma_AB},3,3), ...num2cell(reshape(scalingMatrix_AD_MD(:,2),3,3)), ...'UniformOutput',0);clearvars S_LOC A_LOC scaleFact_S_AB scaleFact_A_AB S0_range A0_range
clearvars inv_S_AB Ms_AB Ma_AB%% Output Plot% Ouput folder
folderOut          = fullfile(cd(cd('..')),'output');%% Comparison of the normalized scaling factors of the S0 and A0 modes
% In theory, the normalized scaling factors should be identical among
% these two paths as long as the sizes of the used dual PZTs are identical.
% Please see Fig. 11.% Scaling factor computation at AD using collocate PZTS
S0_range = 5000:5600;
A0_range = 5600:5900;[~, S_LOC] = cellfun(@(x) max(x(S0_range)),S0_D_F_Col);
[~, A_LOC] = cellfun(@(x) max(x(A0_range)),A0_D_F_Col);scaleFact_S_D = ...cellfun(@(x,y) x(y),S0_D_F_Col,num2cell(S_LOC+S0_range(1)-1));
scaleFact_A_D = ...cellfun(@(x,y) x(y),A0_D_F_Col,num2cell(A_LOC+A0_range(1)-1));scalingMatrix_AD_Col  = [reshape(scaleFact_S_D',9,1)/scaleFact_S_D(1) ...reshape(scaleFact_A_D',9,1)/scaleFact_A_D(1)];clearvars S_LOC A_LOC scaleFact_S_D scaleFact_A_D S0_range A0_range% Scaling factor computation at AB using collocate PZTS
S0_range = 5000:5400;
A0_range = 5000:5500;[~, S_LOC] = cellfun(@(x) max(x(S0_range)),S0_B_F_Col);
[~, A_LOC] = cellfun(@(x) max(x(A0_range)),A0_B_F_Col);scaleFact_S_B = ...cellfun(@(x,y) x(y),S0_B_F_Col,num2cell(S_LOC+S0_range(1)-1));
scaleFact_A_B = ...cellfun(@(x,y) x(y),A0_B_F_Col,num2cell(A_LOC+A0_range(1)-1));scalingMatrix_AB_Col   = [reshape(scaleFact_S_B',9,1)/scaleFact_S_B(1) ...reshape(scaleFact_A_B',9,1)/scaleFact_A_B(1)];clearvars S_LOC A_LOC scaleFact_S_B scaleFact_A_B S0_range A0_rangey_S0(:,1) = scalingMatrix_AD_Col(:,1);
y_S0(:,2) = scalingMatrix_AB_Col(:,1);y_A0(:,1) = scalingMatrix_AD_Col(:,2);
y_A0(:,2) = scalingMatrix_AB_Col(:,2);figure(1) ; x = 1:9;
h = stem(x,y_S0,'fill','--','linewidth',2);
legend('AB path', 'AD path');legend('location','northEast', ...'orientation', 'horizontal');legend('boxoff');
set(h(1),'MarkerFaceColor','red','Marker','s','markeredgecolor','none')
set(h(2),'MarkerFaceColor','blue','Marker','d','markeredgecolor','none')
set(gca, 'xTickLabel',{'S_1_1';'S_1_2';'S_1_3';'S_2_1'; ...'S_2_2';'S_2_3';'S_3_1';'S_3_2';'S_3_3';})
xlim([0 10]);%ylim([-8 8]);
set(gca,'fontsize',12,'linewidth',2,'fontweight','bold','XTick' ,[1:9]);
set(gcf,'pos',[50 50 450 250]);
xlabel('\bf Normalized scaling factor');
ylabel('\bf Normalized amplitdue');
print(fullfile(folderOut,'EXP_ScalingS0'),'-djpeg','-r0')figure(2) ; x = 1:9;
h = stem(x,y_A0,'fill','--','linewidth',2);
legend('AB path', 'AD path');legend('location','northEast', ...'orientation', 'horizontal');legend('boxoff');
set(h(1),'MarkerFaceColor','red','Marker','s','markeredgecolor','none')
set(h(2),'MarkerFaceColor','blue','Marker','d','markeredgecolor','none')
set(gca, 'xTickLabel',{'A_1_1';'A_1_2';'A_1_3';'A_2_1'; ...'A_2_2';'A_2_3';'A_3_1';'A_3_2';'A_3_3';})
xlim([0 10]);%ylim([-8 8]);
set(gca,'fontsize',12,'linewidth',2,'fontweight','bold','XTick' ,[1:9]);
set(gcf,'pos',[50 50 450 250]);
xlabel('\bf Normalized scaling factor');
ylabel('\bf Normalized amplitdue');
print(fullfile(folderOut,'EXP_ScalingA0'),'-djpeg','-r0')%% Comparison between the S0 and A0 modes in the path AD
% decomposed by the proposed technique and the ones selectively generated
% by the collocated PTS. Please see Fig. 10.% experiment parameter
startTime   =  5000;        % time point at a peak of toneburst input
fs          =  5000000;     % sampling frequency
endTime     =  6500;        % end time point to be plottedx_path = 5000:6500;
x_time = (x_path-5000)./fs*1000 ;  % for ms

三、运行结果






四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1] 沈再阳.精通MATLAB信号处理[M].清华大学出版社,2015.
[2]高宝建,彭进业,王琳,潘建寿.信号与系统——使用MATLAB分析与实现[M].清华大学出版社,2020.
[3]王文光,魏少明,任欣.信号处理与系统分析的MATLAB实现[M].电子工业出版社,2018.

【数字信号去噪】基于matlab同心兰姆波模式分解【含Matlab源码 679期】相关推荐

  1. 【Matlab语音处理】汉宁窗FIR陷波滤波器语音信号加噪去噪【含GUI源码 1711期】

    一.代码运行视频(哔哩哔哩) [Matlab语音处理]汉宁窗FIR陷波滤波器语音信号加噪去噪[含GUI源码 1711期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 ...

  2. 【Matlab生物电信号】生物电信号仿真【含GUI源码 684期】

    一.代码运行视频(哔哩哔哩) [Matlab生物电信号]生物电信号仿真[含GUI源码 684期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1]董兵,超于毅,李 ...

  3. 【Matlab语音分析】语音信号分析【含GUI源码 1718期】

    一.代码运行视频(哔哩哔哩) [Matlab语音分析]语音信号分析[含GUI源码 1718期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1]韩纪庆,张磊,郑铁 ...

  4. 【Matlab验证码识别】遗传算法和最大熵优化+大津法(OTSU)+自定义阈值数字验证码识别【含GUI源码 1694期】

    一.代码运行视频(哔哩哔哩) [Matlab验证码识别]遗传算法和最大熵优化+大津法(OTSU)+自定义阈值数字验证码识别[含GUI源码 1694期] 二.matlab版本及参考文献 1 matlab ...

  5. 【Matlab人脸识别】BP神经网络人脸识别(含识别率)【含GUI源码 891期】

    一.代码运行视频(哔哩哔哩) [Matlab人脸识别]BP神经网络人脸识别(含识别率)[含GUI源码 891期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1] ...

  6. 【Matlab人脸识别】形态学教室人数统计(带面板)【含GUI源码 1703期】

    一.代码运行视频(哔哩哔哩) [Matlab人脸识别]形态学教室人数统计(带面板)[含GUI源码 1703期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1]孟 ...

  7. 【Matlab人脸识别】人脸实时检测与跟踪【含GUI源码 673期】

    一.代码运行视频(哔哩哔哩) [Matlab人脸识别]人脸实时检测与跟踪[含GUI源码 673期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1]孟逸凡,柳益君 ...

  8. 【Matlab图像融合】小波变换遥感图像融合【含GUI源码 744期】

    一.代码运行视频(哔哩哔哩) [Matlab图像融合]小波变换遥感图像融合[含GUI源码 744期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1] 包子阳,余 ...

  9. 【Matlab语音加密】语音信号加密解密(带面板)【含GUI源码 181期】

    一.代码运行视频(哔哩哔哩) [Matlab语音加密]语音信号加密解密(带面板)[含GUI源码 181期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1]韩纪庆 ...

  10. 【Matlab身份证识别】身份证号码识别【含GUI源码 014期】

    一.代码运行视频(哔哩哔哩) [Matlab身份证识别]身份证号码识别[含GUI源码 014期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 [1] 蔡利梅.MAT ...

最新文章

  1. 0409-0416的笔记
  2. 19年NAACL纪实:自然语言处理的实用性见解 | CSDN博文精选
  3. Java 操作POI 之复制sheet页
  4. libevent源码深度剖析九
  5. 写随笔写日记多参与评论
  6. 【优化预测】基于matlab灰狼算法优化BP神经网络预测【含Matlab源码 1728期】
  7. xubuntu12.04配置
  8. Underexposed Photo Enhancement using Deep Illumination Estimation阅读札记
  9. (论文加源码)基于自动编码器和LSTM的脑电情感识别(数据集为DEAP)提取了功率谱密度,并进行了无编码和SVM的对比实验。
  10. 猫哥教你写爬虫 029--爬虫初探-requests
  11. SQL注入(基于 tryhackme 的讲解)
  12. S32DS封装静态库相关问题
  13. NXP RT1021初探
  14. golang 设置goproxy代理的小细节,适用于go module下载超时,阿里云镜像go module下载超时
  15. python编程从入门到实践django-首页
  16. 安全研究 # Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity Detection
  17. egg.js入门教程视频文件(转载于cnode社区)
  18. java闭锁_Java闭锁_CountDownLatch
  19. 今天开始使用oschina
  20. idea展开折叠类中所有方法

热门文章

  1. Python学习Day14
  2. sublim插件(待续)
  3. python 字典的函数
  4. Android loader 详解
  5. 福建农林大学外事处界面设计
  6. 20190608每日一句
  7. 190303每日一句
  8. Atitit springboot 全局异常处理 1.1.@ControllerAdvice 不起作用 public class ExceptionHandle { @ExceptionHand
  9. Atitit 命令行执行springboot程序 目录 1.1. 执行spel表达式,调用app main,获取context 1 1.2. 直接在Application main函数内执行 1
  10. Atitit.软件开发概念说明--io系统区--特殊文件名称保存最佳实践文件名称编码...filenameEncode