how to add pink noise to force

9 次查看(过去 30 天)
this is the function for the oscillator with the additional force of white noise (awgn). and can I somehow add pink noise to the force? instead of awgn
function dy=x(t,y) global w0 alfa f gama teta b %k1 = wgn(1000,1,100); dy=zeros(2,1);
dy(1)=y(2); %dy(2)=-teta*y(2)+w0^2*(1-alfa*y(1)^2)*y(1)+f*cos(gama*t); %dy(2)=-teta*y(2)+w0*y(1)-alfa*y(1)^3+f*cos(gama*t)+wgn(1000,1,0);
dy(2)=-teta*y(2)+w0^2*(1-alfa*y(1)^2)*y(1)+f*cos(gama*t)+b*awgn(dy(2),0.01);
  3 个评论
lasha dalaqishvili
I don't have one in this function, I coudn't add it. pink noise (flicker noise) there is a program in mathlab. This is pink noise generator https://www.mathworks.com/matlabcentral/fileexchange/42919-pink--red--blue-and-violet-noise-generation-with-matlab-implementation?focused=6636118&tab=function
lasha dalaqishvili
lasha dalaqishvili 2018-1-11
function y = pinknoise(N)
% function: y = pinknoise(N) % N - number of samples to be returned in a row vector % y - a row vector of pink (flicker) noise samples
% The function generates a sequence of pink (flicker) noise samples. % In terms of power at a constant bandwidth, pink noise falls off at 3 dB/oct, i.e. 10 dB/dec.
% difine the length of the vector and % ensure that the M is even, this will simplify the processing if rem(N, 2) M = N+1; else M = N; end

请先登录,再进行评论。

回答(1 个)

Hristo Zhivomirov
Hristo Zhivomirov 2018-10-7
Hi Lasha!
Please, see my code Pink, Red, Blue and Violet Noise Generation with Matlab on Matlab File Exchange. You can use example2.m in order to add some pink noise to your initial signal.
All best,
Hristo Zhivomirow

类别

Help CenterFile Exchange 中查找有关 Block and Blockset Authoring 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by