5
votes
Kalman Filter: Why $ Q $ Discrete Is Defined as $\int_0^Te^{\mathbf{A}\tau} Q e^{\mathbf{A}^T \tau} d\tau$?
The simple answer is that you discretize Differntial Equation.
Actually a linear differential equation.
The question is why the Matrix Exponential?
Well, try to remember what are the solutions of ...
4
votes
Under what conditions is there a one-to-one mapping between continuous-time and discrete-time signals?
Apart from practical errors related to the truncation of the infinitely-long energy signal when discretized to digital, can we find a UNIQUE mapping between the two signal forms?
Yes.
Say you're ...
4
votes
Accepted
First Order Hold discrete-time approximation to first order continuous-time linear system
The solution comes from assuming that
$$
x(t) = x[k] + \frac{x[k+1]-x[k]}{T}(t-kT), \ \ t\in[kT,(k+1)T)
$$
where $x[k]:=x(kT)$, this is, a first order hold or a linear interpolation of $x[k]$ and $x[k+...
3
votes
Implementing a Butterworth Filter Manually in C/C++ via Second Order Sections
My code is wrong
Even without assuming that the code's behavior is wrong, for long-term maintainability it has its problems.
You'd do much better to structure your code such that you have a data type ...
3
votes
Accepted
Implementing a Butterworth Filter Manually in C/C++ via Second Order Sections
c) My code is wrong
That one. You have your difference equations backwards. It should be
$$y[n] = x[n] + 2x[n-1] + x[n-2] - a_1y[n-1] - a_2y[n-2]$$
You have your "a" and "b" ...
3
votes
Frequency warping when integrators are replaced with backward-euler and forward-euler integration
To the extent this helps, here are some interesting magnitude and phase plots of the backward Euler (here using the method of impulse invariance mapping which for 1/s has the same result as backward ...
2
votes
s-Domin or z-Domain - What to Use for Mixed systems
First choice :
Convert the Laplace transform of your process to the Z-domain using the ZOH method as it models your DAC. In your case, your DAC is a PWM.
Second choice :
Work in the Laplace domain ...
2
votes
Accepted
Reduce the Number of Intensity Levels of a Grayscale Image in MATLAB
I think by number of levels you want the image full scale grey-scale to be divided piece-wise into given number of levels.
For example: -
If number of levels = 2, then you want only two grey-scales ...
2
votes
Proof of Forward Euler for discretizing a transfer function
Another way to see how the forward Euler method approximates a continuous-time system is by considering the "ideal" mapping of the $s$-plane to the $z$-plane (why?):
$$z=e^{sT}\tag{1}$$
For ...
2
votes
Accepted
Forward Euler Discretization
Multiplication with $s$ in the Laplace transform domain equals differentiation in the time domain. In the discrete-time domain we can approximate differentiation by the equation
$$y[n]=\frac{x[n+1]-x[...
2
votes
Accepted
Frequency warping when integrators are replaced with backward-euler and forward-euler integration
The important thing here is that there is no conventional frequency warping with the forward or backward Euler methods. Frequency warping would mean that the discrete-time (DT) and continuous-time (CT)...
2
votes
Discrete-time sampling of filtered white noise
Hmm. For standard deviation, I see https://dsp.stackexchange.com/a/8632/829 which states for uniform power spectral density $N_0/2$, the standard deviation is
$$\sigma^2 = \int_{-\infty}^\infty \...
2
votes
Accepted
Frequency prewarping of a bilinear transform (Tustin transform)
There might be some undocumented features for the c2d function. Namely, if I follow the documented way of specifying pre-warping (using ...
2
votes
Accepted
How to check that the state observer works appropriately?
Try looking at the error term
$$e(k) = \mathbf{y}(k) - \mathbf{C}_d\cdot\hat{\mathbf{x}}(k)$$
and testing it for whiteness.
If the state estimate is good, then all the predictable component will be ...
2
votes
Accepted
Under what conditions is there a one-to-one mapping between continuous-time and discrete-time signals?
Apart from practical errors related to the truncation of the infinitely-long energy signal when discretized to digital, can we find a UNIQUE mapping between the two signal forms?
No.
I think about ...
1
vote
Accepted
Discretization method for a simple first order system
What you're doing is slightly different from the common mappings from the $s$-domain to the $z$-domain, but it's a peculiar mix of the well-known backward and forward Euler methods.
Using $x$ and $y$ ...
1
vote
Discretization method for a simple first order system
The somewhat annoying answer this question is: there is no single correct answer. You can't do this correctly and you have to pick whatever discretization artifacts is least objectionable for your ...
1
vote
Accepted
States transformation of the bilinear transform
The Tustin approximation is concerned with transfer functions, i.e. relations between inputs and outputs. In state space representation
$$ \dot{\mathbb{x}}(t) = A \mathbb{x}(t) + B \mathbb{u}(t) $$
$$ ...
1
vote
Accepted
Discrete implementation of the PI controller
Define "appropriate".
Yes, the output of the controller will be limited to between your action_max and action_min -- ...
1
vote
Under what conditions is there a one-to-one mapping between continuous-time and discrete-time signals?
IMHO the question has and obvious and boring answer.
Given no additional constrains, no continuous signal can be equivalent to their information-destroying discretized representation.
Let's introduce ...
1
vote
Accepted
Impulse Invariant method for digital filter design
This is just as it turns out when you do the math. The discrete-time Fourier transform (DTFT) of the sampled continuous-time impulse response $h(t)$ is
$$H_d(e^{j\omega T})=\sum_nh(nT)e^{-jn\omega T}\...
1
vote
Discrete-time sampling of filtered white noise
If you sample a finite-power continuous time WSS random process $x(t)$, the auto-correlation of the sampled process $y[k]=x(kT)$ equals the sampled auto-correlation of the continuous-time process:
$$...
1
vote
Accepted
Derive the Forward Euler substitution for transfer function
To the extent you can factor the transfer function into individual integrator sections of the general form $\frac{1}{s}$ you can make this substitution, which is an approximation of the Matched-$z$ ...
1
vote
Frequency warping when integrators are replaced with backward-euler and forward-euler integration
Here's my question, how can one characterize the frequency warping ?
I believe that you'd just have to calculate the poles in the z domain as a function of the parameters. Frequency warping with ...
1
vote
Reduce the Number of Intensity Levels of a Grayscale Image in MATLAB
This is one way to do it
...
1
vote
Discretizing a Controller with the Backward Difference Method
This is kind of hand-wavy, but you can look at this from two different perspectives:
One, you can look at $z^{-1}$ as a "back-step" operator; i.e. if $X(z) = \mathcal{Z}\lbrace x_n \rbrace$, then (...
1
vote
Matlab - Bode plot of Lag Filter + Integrator
You should see that figure(2) is the only process that avoids some errors. Note on figure (1) the magnitude overlaps; you can add a constant say
bode(lag_daccu_d,lagaccu+.0001,pts);
to split them bu ...
1
vote
Matlab - Bode plot of Lag Filter + Integrator
I tried it in Octave, there's definitely a glitch like you said. I tried it with "Tustin" instead of "zoh", same result.
However I was puzzled by your high sampling frequency. Your lag controller ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
discretization × 23discrete-signals × 6
z-transform × 5
matlab × 4
laplace-transform × 4
transfer-function × 3
state-space × 3
noise × 2
sampling × 2
digital-filters × 2
estimation × 2
kalman-filters × 2
control-systems × 2
image-processing × 1
filters × 1
fourier-transform × 1
filter-design × 1
dft × 1
power-spectral-density × 1
continuous-signals × 1
linear-systems × 1
autocorrelation × 1
impulse-response × 1
fourier × 1
random-process × 1