# Tag Info

Let's consider a discrete-time state space model (the derivation for a coninuous-time system is completely analogous): \begin{align}\mathbf{q}[n+1]&=\mathbf{Aq}[n]+\mathbf{b}x[n]\\ y[n]&=\mathbf{c}^T\mathbf{q}[n]+dx[n]\tag{1} \end{align} where $x[n]$ is the input, $y[n]$ is the output, and $\mathbf{q}[n]$ is the state vector. Taking the $\... 6 You can approach the problem using the state transition matrix by solving the standard non-homogeneous ODE in the first equation. The solution to$\dot{x}(t)=A x(t) + B u(t)$is $$x(t)=x_0 e^{At}+\int_{0}^te^{A(t-t')}Bu(t')dt'$$ where$x_0=x(0)$. The quantity$e^{At}$is called the state transition matrix (also the solution to the homogeneous ... 4 as the first answer (with the most votes) says, the kalman filter is better in Any case when signal is changing. Notice the problem statement These use the algorithm to estimate some constant voltage. How could using a Kalman filter for this be better than just keeping a running average? Are these examples just oversimplified use cases of the filter? using a ... 4 Low Pass Filtering It would be good to know what you mean by "simple low pass filter". For example, if your measurements at time$k$are $$p_{k} = \left[ \begin{array}{c} x_k \\ y_k \end{array} \right]$$ and your low pass filtered estimates are: $$p^{\tt LPF}_k = \alpha p^{\tt LPF}_{k-1} + (1-\alpha)p_k$$ then you will have quite a large group ... 3 Yes sure they are LTI. Let$A$be the$(L-1)\times (L-1)$shift matrix $$A := \begin{pmatrix}0 & 1 & 0 && \dots & 0\\0 & 0 & 1 & 0 &\dots &0\\\vdots &&& \ddots && 0\\0&&\dots&&1&0\\0 &&\dots&&0&1\\0&0&\dots&0&0&0\end{pmatrix}$$ and $$B ... 3 Another take: The Kalman Filter lets you add more information about how the system you're filtering works. In other words, you can use a signal model to improve the output of the filter. Sure, a moving average filter can give very good results when you're expecting a close-to-constant output. But as soon as the signal you're modelling is dynamic (think ... 3 I won't add any equations, I will just add some intuition. I will also limit my self for Additive Gaussian White Noise. Now, in that case the Kalman filter can written as a Least Squares problem to solve. I'd say even more, the Kalman Filter is linear, if you have the samples up to certain time T , you can write the Kalman filter as weighted sum of all ... 3 I think your E-step is correct(only one term missing in the last expression: -N\ln\sigma_w ). To obtain the M-step you have to differentiate with respect to all your parameters. You don't have to include u(n) in \theta, since it's defined by p. So you compute \frac{\partial Q}{\partial\theta}=0. Solving for \theta, and this is your new \theta ... 3 Short answer: Yes but no. Long answer: If a system matrix is rectangular then it means either; There are more number of states than the number of their derivatives which is not meaningful. If you have a system such as a jump linear system or something that couples to the initial system and extends the state space, you can still work with ... 3 The equation you're trying to solve is$$ \mathbf{y}=\mathbf{X}\mathbf{h}, $$where \mathbf{h} is your unknown. The matrix \mathbf{X} is going to have a time-shifted structure that reflects the convolution operator. If we assume that the \mathbf{y} vector starts with y(3) i.e. ignores the first two zeroed out elements of y, then the corresponding \... 3 If you look at Chapter 5 of: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-011-introduction-to-communication-control-and-signal-processing-spring-2010/readings/MIT6_011S10_notes.pdf which is entitled "Properties of LTI State Space Models" , equation 5.33 doesn't seem to have a problem with initial conditions, or any other book (... 3 I will ask you something that will give you intuition. How would you calculate the Gradient of an image? Image is a discretization of reality, so how would you estimate the gradient of the "Reality" if you're given only the image? In the case above we use Finite Differences to approximate the continuous derivative. So what actually is approximating \dot{... 3 The discrepancy between your derivation and matlab computation results because of a mistake you did during the partial fraction expansion: Given that the function to be expanded is H(s)$$ H(s) = \frac{K}{As^2 + Bs + C} $$then you should first convert it into the form$$ H(s) = \frac{K/A}{s^2 + (B/A)s + C/A} $$and then apply the expansion as$$ H(s) ... 2 You're using a high order model so you might be running into numerical precision issues. Make sure the realization of model_state_space is minimal. You can do this with min_model_state_space = minreal(model_state_space) Also, not all state-space realizations are created equally. Some have better numerical properties, such as a balanced realization: [... 2 We don't know anything about your system, but general rule is: $$\begin{array} &y[n] &= \mathbf{C}x[n] + \mathbf{D}u[n]\\ x[n+1] &=\mathbf{A}x[n] + \mathbf{B}u[n] \\ \end{array}$$ Where$u[n]$is the input signal value,$x[n]$is state vector value at a given point in time, and$y[n]$is obviously the output. What you need to do is to: ... 2 Rather than write $$x_t = Ax_{t-1} + f(u_{t-1},\mathbf{w})$$ as the state update equation, I'd write: $$\xi = \left[ \begin{array}{c} x_t\\ u_t \end{array} \right]$$ and then $$\xi_t = g(\xi_{t-1},A,\mathbf{w})$$ so that $$y_t = \left[ 1\ \ \ 0 \right] \xi_t + v_t$$ Then you could apply the non-additive noise formulation of the EKF to get ... 2 Let's rewrite your system as $$m \ddot{x}(t) + b \dot{x}(t) + k x(t) = f(t)$$ then you can see what you're saying: Everything I need to know is in$x(t)$! But is it really? State space systems are predicated on having a single, first order differential equation to solve. As you can see in the rewritten equation above, there is a double-derivative ... 2 The problem is numerical. You can in theory place the poles wherever you want. But as you have provided the examples are always academic. The polynomial methods are far far less accurate than matrix methods. The notorious Wilkinson polynomial is a prime example of such problems. In fact root finding of polynomials actually converts the polynomial ... 2 Unnecessary additional information that might help From a pragmatic point of view, there might be a problem when trying to control a given plant using only its transfer function$G_p(s)$. In general, you test the plant putting a series of inputs and seeing how it reacts, measuring the respective outputs. From that, you can model the plant as a transfer ... 2 Well, any input-output representation obviously admits a state-sapce form. for your equation in$y[k]you can easily construct one as follows. Create a "shift" system (an integrator chain) as \begin{aligned} x_1[k+1] &= x_2[k],\\ x_2[k+1] &= x_3[k],\\ &\vdots\\ x_n[k+1] &= y[k] \end{aligned} In this way indeed you havex_n[k] = y[k-1]$... 2 If X is your design matrix then the matlab implementation of Ordinary Least Squares is: h_hat = X'*X\(X'*y); I attempted to answer your other question here: How to apply Least Squares estimation for sparse coefficient estimation? which explains how to create the design matrix. As mentioned this is a second order Moving Average model, lag of 2. https://... 2 I am most convinced you should try Hidden Markov Chains (which i am not explaining here), just justifying its use: Kalman Filter: continuous state space, discrete observations https://stats.stackexchange.com/questions/183118/difference-between-hidden-markov-models-and-particle-filter-and-kalman-filter 2 I've had the same question last week, but I've managed to find how to derive it (getting rid of those$z$terms is indeed tricky). I will give here detailed demonstration of how to arrive to the result given in 1 (with, in your notation,$\alpha = 2 \lambda$). So we define our new discrete-time function transfer as $$\begin{array}{rcl} H_d(z) &=& ... 2 You could use a nonlinear Kalman filter, such as the extended Kalman filter (EKF), and track the phase and frequency as your state variables. In this case, your Kalman filter is essentially acting like a phase-locked loop (PLL). Example reference 2 You can use pyvib to do frequency based subspace identification. Beware that there is no estimation of the initial state. It is possible to do optimization of the identified model, if the data is not perfectly linear. See the implemenentation, maybe you can use it, in case you want to do your own implementation. Somewhat incomplete example. Take a look at ... 2 You can split up the real and imaginary part of the state into their own seperate states. Namely by defining x_r=\mathrm{Re}(x), x_i=\mathrm{Im}(x), A_r=\mathrm{Re}(A), A_i=\mathrm{Im}(A), u_r=\mathrm{Re}(u), u_i=\mathrm{Im}(u), B_r=\mathrm{Re}(B) and B_i=\mathrm{Im}(B) then the differential equation can also be written as$$ \dot{x}_r+i\,\... 1 The model they have used is general and you can apply it to QAM as well. In wireless communication systems, channel and noise are two different impairments affecting the overall transmission. Here as everywhere else, the noise is AWGN (additive white Gaussian; if you want to know what these terms mean, see this article). And the channel is a linear filter ... 1 Assuming that the inputs are$f_1$and$f_2$, $$\dot q = 0 \cdot q + \begin{bmatrix} \quad\left(\frac{T}{T+1}\right)\\ - \left(\frac{1}{T+1}\right)\end{bmatrix}^\top \begin{bmatrix} f_1\\ f_2\end{bmatrix}$$ Since you have not specified the outputs, the output equation cannot be written. 1 One trick will be whether there are any pole-zero cancellations in the overall transfer function. For that, you will probably need to check for the minimality of the system (i.e. check whether the system is both controllable and observable). The question of "determine the order of the transfer function for each input" seems odd, to me. If the system is ... 1 Take the first model and train your model noise matrix$\bf{Q}\$ to account for the variable acceleration. A popular model is the Singer model from 1990 (see ).  Singer, R. A., “Estimating Optimal Tracking Filter Performance for Manned Maneuvering Targets,” IEEE Transactions on Aerospace and Electronic Systems, vol. AES-6, no. 4, .pp. 473-483, July ...