I'm trying to implement noisy AR(1) process and plot it. The observed noisy sequence x(n) = s(n) + w(n) where variance of w(n) = 0.2.

s(n) is defined as an AR(1) process with s(n) = 0.5 s(n-1) + e(n), for n=1:100, s(0) = 0 and the variance of e(n) = 1. w(n) and e(n) are independent.

I first do the following:

N = 100;                       % number of process samples.
a = [1, 0.5];                  % denominator coefficients, p = 1.
b = 1;                         % numerator coefficient.
s = filter(b,a, randn(1,N));   % generate N sample of AR(1) 

nu = sqrt(0.2) * randn(1,N);
x = s + nu;

hold on;
legend('AR(1) Process','Noisy Process');

Can anybody help me whether I do the correct thing. Any help would be appreciated.

  • 1
    $\begingroup$ What is causing you doubt? $\endgroup$
    – user28715
    Dec 16, 2019 at 1:22
  • $\begingroup$ Sir, I couldn't be sure whether I generate the AR(1) model correctly. Is this the way I generated it correct? $\endgroup$
    – Jason
    Dec 16, 2019 at 1:30
  • $\begingroup$ when you add noise to an AR process, the time series is ARMA. why are you adding noise? $\endgroup$
    – user28715
    Dec 16, 2019 at 2:00
  • $\begingroup$ Because that is the observation. After implementing the noisy Ar process, I will apply wiener filter. Assume the filter coefficients are stored in h. Should I apply the Wiener filter to x such that y=filter(h,1,x) which is the filter output? $\endgroup$
    – Jason
    Dec 16, 2019 at 2:37
  • $\begingroup$ I can’t say what you are doing is correct because I don’t know what your ultimate purpose is? $\endgroup$
    – user28715
    Dec 16, 2019 at 3:02

1 Answer 1


Yes, the method you have used generates an AR-(1) random process by inputting Gaussian white noise of unit variance into the LTI filter defined by the coefficeints $a$ and $b$.

Then you are adding some uncorrelated noise to it, which means your random process is not anymore a pure AR-(1) but a noisy one.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.