⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interst.m

📁 电能质量扰动信号
💻 M
字号:
%电压中断(voltage interruption)的ST变换
clc;clear;
%电压中断interruption
t=0:300;
w0=100*pi;
t1=64;t2=224;
y1=stepfun(t,t1);y2=stepfun(t,t2);
y3=y1-y2;
data=(1-0.9756*y3).*sin(w0*0.000625*t);%产生电压中断interruption信号

noise=awgn(data,30,'measured');%产生30dB的高斯白噪声
data_noise=data+noise;%将产生的30dB高斯白噪声迭加到SAG信号中
figure;
%no noise
subplot(2,4,1);plot(t,data);title('电压突降 no noise')
[st_matrix,st_time,st_freq]=st(data);%st of the sag signal
subplot(2,4,2);mesh(abs(st_matrix));
subplot(2,4,3);contourf(abs(st_matrix));
%subplot(2,4,2);mesh(st_time,st_freq,abs(st_matrix));
%subplot(2,4,3);contourf(st_time,st_freq,abs(st_matrix));
subplot(2,4,4);plot(st_time,abs(st_matrix));

%add noise 30 dB
subplot(2,4,5);plot(t,data_noise);title('电压突降 add noise')
[st_matrix_noise,st_time_noise,st_freq_noise]=st(data_noise);
subplot(2,4,6);mesh(st_time,st_freq,abs(st_matrix_noise));
subplot(2,4,7);contourf(st_time,st_freq,abs(st_matrix_noise));
subplot(2,4,8);plot(st_time,abs(st_matrix_noise));
figure(3);contourf(abs(st_matrix_noise));
figure;mesh(abs(st_matrix_noise));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -