标签:cti term rect func plot inf system loading read
谐波的具体生成方法参看论文
Harmonic and Intermodulation Analysis of Nonlinear Devices Used in Virtual Bass Systems
具体的matlab代码为
function Ha = calculate_harmonics()
[d , sr] = wavread(‘110hz.wav‘);
% full-wave rectifier NLD transfer function , y = |x|
y = abs(d);
% 论文中的公式
y_poly = 1.307 * d.^6 - 2.6593 * d.^4 + 2.2781 * d.^2 + 0.0838;
% soft clipping y = x/(K|x|+1),K=1
K = 1;
y_soft = d./(Kabs(d)+1);
function my_plot(data)
N = length(data);
xdft = fft(data);
xdft = xdft(1:N/2+1);
freq = 0:sr/N:sr/2;
plot(freq, (2/N)*abs(xdft))
end
subplot(411)
my_plot(d)
subplot(412)
my_plot(y)
subplot(413)
my_plot(y_poly)
subplot(414)
my_plot(y_soft)
end
测试结果为
标签:cti term rect func plot inf system loading read
原文地址:https://www.cnblogs.com/zyy-summary/p/13330033.html