Questions tagged [state-space]

State-space models are models that use state variables to describe a system by a set of first-order differential or difference equations, rather than by one or more nth-order differential or difference equations. State variables x(t) can be reconstructed from the measured input-output data, but are not themselves measured during an experiment.

186 questions
0
votes
1 answer

How to simulate the posterior filtered estimates of a Kalman Filter using the DSE package in R

How do I call for the posterior (refined) state estimates from a Kalman Filter simulation in R using the DSE package? I have added an example below. Assume that I have created a simple random walk state space with the error being a standard normal…
user5211911
  • 51
  • 1
  • 11
0
votes
1 answer

How to calculate AIC, BIC and likelihoods of a fitted kalman filter using the DSE function in R

I would like to test the suitability of the dynamic linear model which I have fitted to a problem set of data. I have done this using the SS() function in the dse package in R. Are there any ways of testing the fit of the model in R using…
user5211911
  • 51
  • 1
  • 11
0
votes
1 answer

How do I implement a state space tree (which is a binary tree) in python?

Given (M, F) - With every step of a certain process, the tuple becomes either (M + F, F) or (M, M + F). So, starting with (1, 1), the following are possible: The algorithm I've followed while drawing the tree is - If not root, left_ child =…
0
votes
0 answers

Code equivalent for State-Space Simulink model

I am currently working on Simulink/Matlab code the idea is to remove some Simulink blocks that annoy our developing team. We are fighting with State-Space Model. The configuration of mentioned block is presented as follows: Our question is: Is…
Mr.Nimelo
  • 316
  • 4
  • 17
0
votes
1 answer

How to access array?

right now I'm working on control.matlap.tf2ss and I would like to access my array in my state space. Here is my code Gs = tf([P.l], [P.Jzz, 0, 0]) Cs = tf([P.Kp, P.Kd], 1) Gcl = feedback(series(Cs, Gs), 1) po = pole(Gcl) num, den = tfdata(Gs) sys…
0
votes
1 answer

Initial condition of 2nd order State-Space Representation (MATLAB)

I want to calculate the initial condition x0 of a sate-space representation of 2nd Order in order to use it in lsim command, using the initial system outputs (that I already have). I know that an initial condition for 1st order looks like this: (sys…
Ben Jo
  • 71
  • 1
  • 15
0
votes
1 answer

Imposing linear restrictions with MARSS

On the MARSS Userguide it is said that you can impose linear restrictions on parameters and they give a theoretical example. I'd like a practical example. My problem is that I do not know how to implement a linear restriction such as: a b c …
Pedro Braz
  • 2,261
  • 3
  • 25
  • 48
0
votes
0 answers

lsim command with initial condition

while using the lsim command of matlab I found out that the initial condition in my program doesn't affect the simulation's output. y = lsim(F,input,time,x0); Where F is a transfer function, and x0 the initial condition that I calculate with the…
Ben Jo
  • 71
  • 1
  • 15
0
votes
0 answers

Predicting Multivariate time series model (MARSS) with covariates

I am running a multivariate autoregressive state-space model using the MARSS package. I get an error when attempting to predict. This is the code - library(MARSS) A = "zero" U = "zero" B = "identity" Z = "identity" Q = "equalvarcov" R =…
0
votes
0 answers

How to run a dynamic linear regression in R?

I am new to using R as I usually use Stata. I want to estimate a state space model on some time series data with time varying coefficients. From what I have gathered this is not possible to do in Stata. I have downloaded the dlm package in R and I…
G.White
  • 17
  • 2
0
votes
1 answer

Clojure loop and recur or reduce in state space model

I am trying to write up a simple Markovian state space models, that, as the name suggests iteratively looks back one step to predict the next state. Here is what is supposed to be a MWE, though it is not because I cannot quite figure out how I am…
Astrid
  • 1,846
  • 4
  • 26
  • 48
0
votes
0 answers

how to generate array B in the state-space model in matlab

I would like to plot in matlab the transfer function which comes from the state-space model: G * x + C * x’= B * ip(t) up(t) = LT * x. In above formula G,C have been read from a file and their size is 1882*1882, ip(t) = [i1 i2 i3 i3 i5]' (input),…
0
votes
1 answer

What are the possible reasons if Kalman filter can not calculate a stabilizing Kalman gain?

I have a question about Kalman filter. I am using Kalman filter for a state space model as following: X(k+1) = A(k)x(k)+B(k)u(k)+w(k), w(k) ∼ N(0,Q) Y(k) = C(K)x(k)+D(k)u(k)+v(k), v(k) ∼ N(0,R) Which the state space matrixes (A(k),B(k),C(k),D(k))…
0
votes
1 answer

Matlab: pole zero cancellation issue

I am working with Matlab to perform some control analysis on a system I'm working with. I have developed a model of the system in state space representation and have designed a feedback compensator to produce the closed loop response I want. The…
Init33
  • 11
  • 1
  • 4
0
votes
1 answer

C library linked to Ox

I'm currently playing around with state space models and the book I'm using has some very useful examples. Problem: These examples are written in Ox, which somewhat limits its usability, particularly as I want to test out some of my models using the…
youjustreadthis
  • 622
  • 3
  • 9
  • 24