From: Abdullah M. Hafiz on
Hi,
I've been working in developing input/output ARMA model for surface roughness profile. I am using MATLAB armax command for that, which has a flexibility to choose my model's order. I was just wondering, is there any way I can plot the residuals, obtained from the ARMA model. My intension is to verify the adequacy of the developed model, that's why thinking to figure out the aucorrelation function of residuals. But I'm really confused regarding how to do that.
It would also be great, if someone states other ways to verify the model adequacy developed by armax.

I would also prefer some other ways to develop ARMA model as well as test its adequacy.

Regards,

Hafiz

From: Husam Aldahiyat on
"Abdullah M. Hafiz" <hafiz_fcc(a)yahoo.com> wrote in message <hjqvlb$3h9$1(a)fred.mathworks.com>...
> Hi,
> I've been working in developing input/output ARMA model for surface roughness profile. I am using MATLAB armax command for that, which has a flexibility to choose my model's order. I was just wondering, is there any way I can plot the residuals, obtained from the ARMA model. My intension is to verify the adequacy of the developed model, that's why thinking to figure out the aucorrelation function of residuals. But I'm really confused regarding how to do that.
> It would also be great, if someone states other ways to verify the model adequacy developed by armax.
>
> I would also prefer some other ways to develop ARMA model as well as test its adequacy.
>
> Regards,
>
> Hafiz
>

obtain the numerator and denominator of the ARMA model (should be in the ARMA model structure), then use filter() with these parameters along with the ARMA system input as inputs. Take the output from filter() and compare it to the original output to see residuals and all that.

I don't know if this is already built in but I reckon this method works.
From: Abdullah M. Hafiz on
"Husam Aldahiyat" <numandina(a)gmail.com> wrote in message <hjr69o$l42$1(a)fred.mathworks.com>...
> "Abdullah M. Hafiz" <hafiz_fcc(a)yahoo.com> wrote in message <hjqvlb$3h9$1(a)fred.mathworks.com>...
> > Hi,
> > I've been working in developing input/output ARMA model for surface roughness profile. I am using MATLAB armax command for that, which has a flexibility to choose my model's order. I was just wondering, is there any way I can plot the residuals, obtained from the ARMA model. My intension is to verify the adequacy of the developed model, that's why thinking to figure out the aucorrelation function of residuals. But I'm really confused regarding how to do that.
> > It would also be great, if someone states other ways to verify the model adequacy developed by armax.
> >
> > I would also prefer some other ways to develop ARMA model as well as test its adequacy.
> >
> > Regards,
> >
> > Hafiz
> >
>
> obtain the numerator and denominator of the ARMA model (should be in the ARMA model structure), then use filter() with these parameters along with the ARMA system input as inputs. Take the output from filter() and compare it to the original output to see residuals and all that.
>
> I don't know if this is already built in but I reckon this method works.

Thank you very much for your suggestion. The thing is MATLAB returns ARMA model as an IDPOLY output. For an instance, for my case the intended structure is like,
Discrete-time IDPOLY model:
A(q)y(t) = B(q)u(t) + C(q)e(t)
where, y(t)=> output, u(t)=> input
And
A(q) = 1 - 0.8356 q^-1 + 0.1549 q^-2

B(q) = 0.08899 q^-2 + 0.08928 q^-3

C(q) = 1 + 0.2435 q^-1 + 0.3926 q^-2

For this kind of model, what should be the numerator and denominator? It would be great, if you state a bit more explicitly.

Regards,

Hafiz
From: Wayne King on
"Abdullah M. Hafiz" <hafiz_fcc(a)yahoo.com> wrote in message <hjr9an$s66$1(a)fred.mathworks.com>...
> "Husam Aldahiyat" <numandina(a)gmail.com> wrote in message <hjr69o$l42$1(a)fred.mathworks.com>...
> > "Abdullah M. Hafiz" <hafiz_fcc(a)yahoo.com> wrote in message <hjqvlb$3h9$1(a)fred.mathworks.com>...
> > > Hi,
> > > I've been working in developing input/output ARMA model for surface roughness profile. I am using MATLAB armax command for that, which has a flexibility to choose my model's order. I was just wondering, is there any way I can plot the residuals, obtained from the ARMA model. My intension is to verify the adequacy of the developed model, that's why thinking to figure out the aucorrelation function of residuals. But I'm really confused regarding how to do that.
> > > It would also be great, if someone states other ways to verify the model adequacy developed by armax.
> > >
> > > I would also prefer some other ways to develop ARMA model as well as test its adequacy.
> > >
> > > Regards,
> > >
> > > Hafiz
> > >
> >
> > obtain the numerator and denominator of the ARMA model (should be in the ARMA model structure), then use filter() with these parameters along with the ARMA system input as inputs. Take the output from filter() and compare it to the original output to see residuals and all that.
> >
> > I don't know if this is already built in but I reckon this method works.
>
> Thank you very much for your suggestion. The thing is MATLAB returns ARMA model as an IDPOLY output. For an instance, for my case the intended structure is like,
> Discrete-time IDPOLY model:
> A(q)y(t) = B(q)u(t) + C(q)e(t)
> where, y(t)=> output, u(t)=> input
> And
> A(q) = 1 - 0.8356 q^-1 + 0.1549 q^-2
>
> B(q) = 0.08899 q^-2 + 0.08928 q^-3
>
> C(q) = 1 + 0.2435 q^-1 + 0.3926 q^-2
>
> For this kind of model, what should be the numerator and denominator? It would be great, if you state a bit more explicitly.
>
> Regards,
>
> Hafiz

Hi Hafiz,
As a difference equation your model is:

y(t)=0.8356*y(t-1)-0.1549*y(t-2)+0.08899*u(t-2)+0.08928*u(t-3)+e(t)+0.2435*e(t-1)+0.3926*e(t-2)

y(t) is the output, u(t) is the exogenous term, and e(t) is the white noise disturbance. In this model, you are writing the output as a sum of two convolutions, the first one being a convolution of the input, u(t), with the impulse response, and the 2nd convolution being a filtering of the disturbance, or noise term, e(t). Hence, the transfer function is the ratio of:

(0.08899*z^{-2}+0.08928*z^{-3})/(1-0.8356*z^{-1}+0.1549*z^{-2})

To view:

fvtool([0 0 0.08899 0.08928],[1 -0.8356 0.1549])

Hope that helps,
Wayne
From: Rajiv Singh on
Look up functions RESID, COMPARE, PREDICT and PE (in System Identification
Toolbox). In particular, RESID will plot the autocorrelation of residuals.

Rajiv

"Abdullah M. Hafiz" <hafiz_fcc(a)yahoo.com> wrote in message
news:hjqvlb$3h9$1(a)fred.mathworks.com...
> Hi,
> I've been working in developing input/output ARMA model for surface
> roughness profile. I am using MATLAB armax command for that, which has a
> flexibility to choose my model's order. I was just wondering, is there any
> way I can plot the residuals, obtained from the ARMA model. My intension
> is to verify the adequacy of the developed model, that's why thinking to
> figure out the aucorrelation function of residuals. But I'm really
> confused regarding how to do that.
> It would also be great, if someone states other ways to verify the model
> adequacy developed by armax.
> I would also prefer some other ways to develop ARMA model as well as test
> its adequacy.
>
> Regards,
>
> Hafiz
>