Hello, The following system (in state-space form) gives a damped sinusoid A = [ 0 1 ] [ -0.98 1.365 ] C = [ 1 0 ] x[n+1] = A x[n] y = C x[n] A is the state-matrix, x the state (with initial condition [1;0]) and y the output. Now if I have a known output can I somehow find the state-matrix A? I know that it is possible to find the parameters of a damped sinusoid from 3 samples. So it has to be possible to find a state-matrix from a known output which is assumed to be a sine-wave. gr. Anton
parameters of sinusoid
Started by ●November 26, 2006
Reply by ●November 26, 20062006-11-26
banton wrote:> Hello, > > The following system (in state-space form) > gives a damped sinusoid > > A = > [ 0 1 ] > [ -0.98 1.365 ] > > C = [ 1 0 ] > > x[n+1] = A x[n] > y = C x[n] > > A is the state-matrix, x the state (with initial condition [1;0]) > and y the output. > > Now if I have a known output can I somehow find the state-matrix A? > I know that it is possible to find the parameters of a > damped sinusoid from 3 samples. So it has to be possible to > find a state-matrix from a known output which is > assumed to be a sine-wave. >No you cannot, and no it is not. Altogether, A and C have six parameters. Your damped sinusoid only specifies three. Without restricting three of the parameters in some way you cannot fully specify the system from the original damped sinusoid. You should, however, be able to specify a three-dimensional surface in six-dimensional space, any point on which will yield the same output for the same starting state. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by ●November 26, 20062006-11-26
Tim Wescott wrote:> banton wrote: > > > Hello, > > > > The following system (in state-space form) > > gives a damped sinusoid > > > > A = > > [ 0 1 ] > > [ -0.98 1.365 ] > > > > C = [ 1 0 ] > > > > x[n+1] = A x[n] > > y = C x[n] > > > > A is the state-matrix, x the state (with initial condition [1;0]) > > and y the output. > > > > Now if I have a known output can I somehow find the state-matrix A? > > I know that it is possible to find the parameters of a > > damped sinusoid from 3 samples. So it has to be possible to > > find a state-matrix from a known output which is > > assumed to be a sine-wave. > > > No you cannot, and no it is not. > > Altogether, A and C have six parameters. Your damped sinusoid only > specifies three. Without restricting three of the parameters in some > way you cannot fully specify the system from the original damped sinusoid. > > You should, however, be able to specify a three-dimensional surface in > six-dimensional space, any point on which will yield the same output for > the same starting state. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com > > Posting from Google? See http://cfaj.freeshell.org/google/ > > "Applied Control Theory for Embedded Systems" came out in April. > See details at http://www.wescottdesign.com/actfes/actfes.htmlI don't see why it can't be done. I don't see where there are 6 parameters that need to be calculated. Only the lower two numbers of the A array will change. Peter Nachtwey
Reply by ●November 26, 20062006-11-26
banton skrev:> Hello, > > The following system (in state-space form) > gives a damped sinusoid...> Now if I have a known output can I somehow find the state-matrix A?I think Kalman filters are used to identify parameters of state-space models. Rune
Reply by ●November 26, 20062006-11-26
Anton wrote:> Hello, > > The following system (in state-space form) > gives a damped sinusoid > > A = > [ 0 1 ] > [ -0.98 1.365 ] > > C = [ 1 0 ] > > x[n+1] = A x[n] > y = C x[n] > > A is the state-matrix, x the state (with initial condition [1;0]) > and y the output. > > Now if I have a known output can I somehow find the state-matrix A?I thought you knew what the matrix A was?
Reply by ●November 26, 20062006-11-26
> > >Anton wrote: >> Hello, >> >> The following system (in state-space form) >> gives a damped sinusoid >> >> A = >> [ 0 1 ] >> [ -0.98 1.365 ] >> >> C = [ 1 0 ] >> >> x[n+1] = A x[n] >> y = C x[n] >> >> A is the state-matrix, x the state (with initial condition [1;0]) >> and y the output. >> >> Now if I have a known output can I somehow find the state-matrix A? > >I thought you knew what the matrix A was? > >Thanks for the replies. Andor, I gave an example with a known matrix A which produces some output from an initial state. But what if I have some output and I don't know A but I assume that there is a system x[n+1] = A * x[n] y = [ 1; 0] * x[n] which produces the output. If I further more restrict A to be [ 0 1 ] [ a b ] how can I find a and b from 3 samples of my output? As Tim pointed out if I want to find A (and C), I cannot find a unique solution. Also I think I was wrong to say I can find the parameters of a damped sinusoid by 3 samples. I can find the parameters of an undamped sinusoid from 3 samples, but for a damped one I need 4 samples. Because for the undamped one a=1, so I just need to find b. (I am unsure about everything I am saying here) Let's drop the state-space stuff (I hoped it would give me a easier view on it...) and look at it this way: y[n] = a * y[n-1] + b * y[n-2] now I have a signal and I want to get to 'a' and 'b' from a given set of samples 'y'. As I said I guess I need 4 samples to find a unique solution. Like this: y[3] = a y[2] + b y[1] y[4] = a y[3] + b y[2] and the y's are known. I want to use this for extraplation of a 1d motion (like a fader). e.g. if I would move a fader the system would find the parameters of a damped sinusoid for the sampled motion and would create a control signal from the estimated parameters. (I also wanted to learn something about state-space realizations, that is why I was putting it in this form). Any suggestions, ideas or corrections are appreciated. gr. Anton
Reply by ●November 26, 20062006-11-26
Peter Nachtwey wrote:> Tim Wescott wrote: > >>banton wrote: >> >> >>>Hello, >>> >>>The following system (in state-space form) >>>gives a damped sinusoid >>> >>>A = >>>[ 0 1 ] >>>[ -0.98 1.365 ] >>> >>>C = [ 1 0 ] >>> >>>x[n+1] = A x[n] >>>y = C x[n] >>> >>>A is the state-matrix, x the state (with initial condition [1;0]) >>>and y the output. >>> >>>Now if I have a known output can I somehow find the state-matrix A? >>>I know that it is possible to find the parameters of a >>>damped sinusoid from 3 samples. So it has to be possible to >>>find a state-matrix from a known output which is >>>assumed to be a sine-wave. >>> >> >>No you cannot, and no it is not. >> >>Altogether, A and C have six parameters. Your damped sinusoid only >>specifies three. Without restricting three of the parameters in some >>way you cannot fully specify the system from the original damped sinusoid. >> >>You should, however, be able to specify a three-dimensional surface in >>six-dimensional space, any point on which will yield the same output for >>the same starting state. >> > > I don't see why it can't be done. I don't see where there are 6 > parameters that need to be calculated. Only the lower two numbers of > the A array will change. >There is no law that says only the lower two numbers will change. You may choose to only change the lower two numbers of the A matrix, and to constrain the C matrix to being C = [c 0] to accommodate amplitude changes in the response -- but you're doing exactly what I was talking about, constraining three of the available six numbers and only adjusting the remaining three. So you cannot find _the_ state matrix (and output matrix) from the provided data, because there isn't a unique solution. I did misread the second part of the OP's question: you can indeed find _a_ state matrix from three points of an output assumed to be a damped sinusoid (actually, from three points of an output assumed to be from a second-order system). -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by ●November 26, 20062006-11-26
banton wrote: ...> I want to use this for extraplation of a 1d motion (like > a fader). > e.g. if I would move a fader the system would find the parameters of > a damped sinusoid for the sampled motion and would create a control > signal from the estimated parameters. (I also wanted to learn > something about state-space realizations, that is why I was > putting it in this form). > Any suggestions, ideas or corrections are appreciated.Will moving a fader necessarily provide exponential damping? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●November 26, 20062006-11-26
Anton wrote: ...> Let's drop the state-space stuff (I hoped it would give me > a easier view on it...) and look at it this way: > > y[n] = a * y[n-1] + b * y[n-2] > > now I have a signal and I want to get to 'a' and 'b' from > a given set of samples 'y'. > As I said I guess I need 4 samples to find a unique solution. > Like this: > > y[3] = a y[2] + b y[1] > y[4] = a y[3] + b y[2] > > and the y's are known.That's correct. It is really simple in this case, no need for state space representation.> > I want to use this for extraplation of a 1d motion (like > a fader). > e.g. if I would move a fader the system would find the parameters of > a damped sinusoid for the sampled motion and would create a control > signal from the estimated parameters. (I also wanted to learn > something about state-space realizations, that is why I was > putting it in this form).Control signal from the fader motion to control what?> Any suggestions, ideas or corrections are appreciated.Suggestions for what? You know everything already. The only thing that I can add is that you might be interested to try least-squares solution to find the parameters a and b from more than two equations. This would be, by the way, called the autocovariance method to compute a second order linear predictor. Regards, Andor
Reply by ●November 26, 20062006-11-26
banton wrote:> > > >...> I gave an example with a known matrix A which produces some output > from an initial state. But what if I have some output and > I don't know A but I assume that there is a system > x[n+1] = A * x[n] > y[n] = [ 1; 0] * x[n] > which produces the output. > If I further more restrict A to be > [ 0 1 ] > [ a b ] > how can I find a and b from 3 samples of my output?i think you can do it from 2 adjacent samples of your output if your state variable system is "completely observable". some control freaks should pipe in and spell out what makes a state variable system completely observable. and there are an infinite number of sinusoids that will result in the same [a b] pair. r b-j






