matlab谐波仿真代码,matlab的谐波仿真程序基于ip-iq法???怎么出不来图像啊???...

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

clear;

st=0.4;%stop time

f=50.0;

w=2*f*pi;

im1=35*sqrt(2);

im2=3.5*sqrt(2);

im5=5.2*sqrt(2);

dt=1/6400;

t1=0:dt:0.2;

t2=0.2:dt:st;

t=[t1 t2];

ia1=im1*sin(w*t1)+im2*sin(2*w*t1)+im5*sin(5*w*t1);

ib1=im1*sin(w*t1-2*pi/3)+im2*sin(2*w*t1+2*pi/3)+im5*sin(5*w*t1+2*pi/3);

ic1=im1*sin(w*t1+2*pi/3)+im2*sin(2*w*t1-2*pi/3)+im5*sin(5*w*t1-2*pi/3);

ia2=2*im1*sin(w*t2)+im2*sin(2*w*t2)+im5*sin(5*w*t2);

ib2=2*im1*sin(w*t2-2*pi/3)+im2*sin(2*w*t2+2*pi/3)+im5*sin(5*w*t2+2*pi/3);

ic2=2*im1*sin(w*t2+2*pi/3)+im2*sin(2*w*t2-2*pi/3)+im5*sin(5*w*t2-2*pi/3);

ia=[ia1 ia2];

ib=[ib1 ib2];

ic=[ic1 ic2];

ialpha=sqrt(2/3)*(ia-1/2*ib-1/2*ic);

ibeta=sqrt(2/3)*(sqrt(3)/2*ib-sqrt(3)/2*ic);

ip=sin(w*t).*ialpha-cos(w*t).*ibeta;

iq=-cos(w*t).*ialpha-sin(w*t).*ibeta;

b=[0.00005162416180 -0.000044099640463 -0.000044099640463 0.000051624161810];

a=[1 -2.9682333056622943 2.937692381898015 -0.969444276232397];

izhiliu=filter(b,a,ip);

iwugong=filter(b,a,iq);

ialphafund=sin(w*t).*izhiliu-cos(w*t).*iwugong;

ibetafund=-cos(w*t).*izhiliu-sin(w*t).iwugong;

iafund=sqrt(2/3)*ialphafund;

ibfund=sqrt(2/3)*(-1/2*ialphafund+sqrt(3)/2*ibetafund);

icfund=sqrt(2/3)*(-1/2*ialphafund-sqrt(3)/2*ibetafund);

iah=ia-iafund;

figure(1);

subplot(3,1,1);

plot(t,ia,'b');grid

axis([0 0.4,-150 150]);

subplot(3,1,2);

plot(t,iafund,'b');grid

axis([0 0.4,-150 150]);

subplot(3,1,3);

plot(t,iah,'b');grid

axis([0 0.4,-60 60]);

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值