how to add pink noise to force

조회 수: 9 (최근 30일)
lasha dalaqishvili
lasha dalaqishvili 2018년 1월 9일
답변: Hristo Zhivomirov 2018년 10월 7일
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
lasha dalaqishvili 2018년 1월 9일
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