Even more math testing

I'm matching up this: 
$$\int_{\Gamma} dD \tag 1$$
With what I found in this section of the Wikipedia article on line integrals:
$$\int\limits_{C} f\, ds = \int_{a}^{b} f(\mathbf{r}(t))\,|\mathbf{r}' (t)|\,dt \tag 2$$
It seems $\Gamma$ corresponds to the curve (or path) $C,$ the constant $1$ corresponds to the integrand $f,$ and $dD$ corresponds to what they call an "elementary arc length" $ds.$ That all seems clear enough. Apparently $\mathbf{r}$ get's you from one end of the curve $C$ to the other via its parameter $t$ when $t$ varies from $a$ to $b$ with $a < b.$ The result should be independent of the parameterization $\mathbf{r}$ of $C.$ That all makes sense. However, I'm not familiar with this notation:
$$\int_{\partial \Gamma} D \tag 3$$
What is the meaning of that exactly?
-----------------------------------------------------------------------------------
fun with arrays:

$$
\left[
\begin{array}{c|c}
A_d & B_d \\
\hline
C_d & D_d
\end{array}
\right]_{SIM_d} =
\left[
\begin{array}{c|c}
1-\frac{\alpha_2 \theta}{1 - \alpha_1 (1 - \theta)} & 1-\frac{\theta}{1 - \alpha_1 (1 - \theta)} \\[1.5ex]
\hline
\frac{\alpha_2}{1 - \alpha_1 (1 - \theta)} & \frac{1}{1 - \alpha_1 (1 - \theta)} \\[1.5ex]
\frac{\alpha_2 \theta}{1 - \alpha_1 (1 - \theta)} & \frac{\theta}{1 - \alpha_1 (1 - \theta)} \\[1.5ex]
\frac{\alpha_2 (1-\theta)}{1 - \alpha_1 (1 - \theta)} & \frac{1-\theta}{1 - \alpha_1 (1 - \theta)} \\[1.5ex]
\frac{\alpha_2}{1 - \alpha_1 (1 - \theta)} & \frac{\alpha_1 (1-\theta)}{1 - \alpha_1 (1 - \theta)}
\end{array}
\right]
$$

$$
\left[
\begin{array}{c|c}
A_c & B_c \\
\hline
C_c & D_c
\end{array}
\right]_{SIM_c} =
\left[
\begin{array}{c|c}
\frac{1}{T_s} \log\left(1-\frac{\alpha_2 \theta}{1 - \alpha_1 (1 - \theta)}\right) & \frac{\theta + \alpha_1 (1-\theta) - 1}{T_s \alpha_2 \theta} \log\left(1-\frac{\alpha_2 \theta}{1 - \alpha_1 (1 - \theta)}\right)   \\[1.5ex]
\hline
\frac{\alpha_2}{1 - \alpha_1 (1 - \theta)} & \frac{1}{1 - \alpha_1 (1 - \theta)} \\[1.5ex]
\frac{\alpha_2 \theta}{1 - \alpha_1 (1 - \theta)} & \frac{\theta}{1 - \alpha_1 (1 - \theta)} \\[1.5ex]
\frac{\alpha_2 (1-\theta)}{1 - \alpha_1 (1 - \theta)} & \frac{1-\theta}{1 - \alpha_1 (1 - \theta)} \\[1.5ex]
\frac{\alpha_2}{1 - \alpha_1 (1 - \theta)} & \frac{\alpha_1 (1-\theta)}{1 - \alpha_1 (1 - \theta)}
\end{array}
\right]
$$

Where $T_s$ is the sample period of the discrete time model.

---------------------------------

$$
\left[
\begin{array}{c}
x_{n+1} \\
\hline
y_n
\end{array}
\right] =
\left[
\begin{array}{c|c}
A_d & B_d \\
\hline
C_d & D_d
\end{array}
\right]
\left[
\begin{array}{c}
x_{n} \\
\hline
u_n
\end{array}
\right]
$$
$$
\left[
\begin{array}{c}
\dot{x}(t) \\
\hline
y(t)
\end{array}
\right] =
\left[
\begin{array}{c|c}
A_c & B_c \\
\hline
C_c & D_c
\end{array}
\right]
\left[
\begin{array}{c}
x(t) \\
\hline
u(t)
\end{array}
\right]
$$


--------------------------- 2016.04.23: Below is the last bit of what used to be post SIM8: I removed it until I have time to fix it ----------------

Where the variables with a dot above them indicate rates (time derivatives) and $\dot{t}$ indicates the tax rate, and in general, for sample period $n$, we have:
$$
\begin{align}
H_n &=  \int_\limits{-\infty}^{n T_s} \dot{h}(\tau) d\tau &= h(n T_s) &&\text{cash money in existence by end of period n}\tag {11}\\[1.9ex]
G_n & = \int_\limits{(n-1)T_s}^{n T_s} \dot{g}(\tau) d\tau & = g(n T_s) - g((n-1)T_s) &&\text{government spending in period n}\tag {12}\\[1.9ex]
Y_n & = \int_\limits{(n-1)T_s}^{n T_s} \dot{y}(\tau) d\tau & = y(n T_s) - y((n-1)T_s) &&\text{national income in period n}\tag {13}\\[1.9ex]
T_n & = \int_\limits{(n-1)T_s}^{n T_s} \dot{t}(\tau) d\tau & = t(n T_s) - t((n-1)T_s) &&\text{taxes collected in period n}\tag {14}\\[1.9ex]
Y_{Dn} & = \int_\limits{(n-1)T_s}^{n T_s} \dot{y}_D(\tau) d\tau & = y_D(n T_s) - y_D((n-1)T_s) &&\text{household disposable income in period n}\tag {15}\\[1.9ex]
C_n & = \int_\limits{(n-1)T_s}^{n T_s} \dot{c}(\tau) d\tau & = c(n T_s) - c((n-1)T_s) &&\text{consumption in period n}\tag {16}
\end{align}
$$
For a more detailed descriptions of what the discrete time symbols at the left mean see the section entitled Notations Used in the Book near the beginning of Godley & Lavoie's (G&L's) Monetary Economics, starting at page 10 (page 10 of the .pdf). Or see the extracts from that book in this post by Jason Smith.

Note that $H_n$ are samples of $h$ at the sample times provided $\dot{g}$ is constant between sample times (only changing at the sample times themselves, if at all)

--------------------------------------- End 2016.04.23 SIM8 extract ---------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Table 1: SIM Parameters
Symbol Value
$T_{s_0}$ 1
α1 0.6
α2 0.4
θ 0.2


Table 2: Useful Expressions
Name Expression Value
P 1 - α1(1-θ) 0.52
$Q$ $A_c/(A_d-1)$ 1.085852
$V$ $(B_c-B_d)/(A_d-1)$ -0.34341



Table 3: Discrete Time State Space Matrices
Matrix Elements Name Expression Value
$A_d$ $A_{d_{1,1}}$ $A_d$ 1 - α2θ/P 0.84615385
$B_d$ $B_{d_{1,1}}$ $B_d$ 1 - θ/P 0.61538462
$C_d$ $C_{d_{1,1}}$ $C_Y$ α2/P 0.76923077
$C_{d_{2,1}}$ $C_T$ α2θ/P 0.15384615
$C_{d_{3,1}}$ $C_{Y_D}$ α2(1-θ)/P 0.61538462
$C_{d_{4,1}}$ $C_C$ α2/P 0.76923077
$D_d$ $D_{d_{1,1}}$ $D_Y$ 1/P 1.92307692
$D_{d_{2,1}}$ $D_T$ θ/P 0.38461538
$D_{d_{3,1}}$ $D_{Y_D}$ (1-θ)/P 1.53846154
$D_{d_{4,1}}$ $D_C$ α1(1-θ)/P 0.92307692



Table 4: Continuous Time State Space Matrices & Resistors
Matrix Elements Name Expression Value Name Expression Value
$A_c$ $A_{c_{1,1}}$ $A_c$ $\ln(A_d)/T_{s_0}$ -0.16705 $R_a$ $-{A_c}^{-1}$ 5.986085
$B_c$ $B_{c_{1,1}}$ $B_c$ $Q B_d$ 0.668216 $R_b$ ${B_c}^{-1}$ 1.496521
$C_c$ $C_{c_{1,1}}$ $C_y$ $Q C_d$ 0.83527 $R_{C_y}$ ${C_y}^{-1}$ 1.197217
$C_{c_{2,1}}$ $C_{\tau}$ 0.167054 $R_{C_{\tau}}$ ${C_{\tau}}^{-1}$ 5.986085
$C_{c_{3,1}}$ $C_{y_D}$ 0.668216 $R_{C_{y_D}}$ ${C_{y_D}}^{-1}$ 1.496521
$C_{c_{4,1}}$ $C_c$ 0.83527 $R_{C_c}$ ${C_c}^{-1}$ 1.197217
$D_c$ $D_{c_{1,1}}$ $D_y$ $D_d + V C_d$ 1.658918 $R_{D_y}$ ${D_y}^{-1}$ 0.602802
$D_{c_{2,1}}$ $D_{\tau}$ 0.331784 $R_{D_{\tau}}$ ${D_{\tau}}^{-1}$ 3.014012
$D_{c_{3,1}}$ $D_{y_D}$ 1.327135 $R_{D_{y_D}}$ ${D_{y_D}}^{-1}$ 0.753503
$D_{c_{4,1}}$ $D_c$ 0.658918 $R_{D_c}$ ${D_c}^{-1}$ 1.517639

------------------------------------------------------------------------------------------------------------------



Table 2: Useful Expressions
Name Expression Value
P 1 - α1(1-θ) 0.52
$Q$ $A_c/(A_d-1)$ 1.085852
$V$ $(B_c-B_d)/(A_d-1)$ -0.34341

------------------------------------------------------------------------------------------------------------------
  1. When $T_s = T_{s_0}$ it reduces to the original $SIM_d$ model.
  2. At $T_s = 0$ the flows of $SIM_{T_s}$ will also be $0$ since the integration time will be $0$, and thus $C_{T_s} = 0$ and $D_{T_s} = 0$
  3. $d C_{T_s} / d T_s$ evaluated at $T_s = 0$ will be equal to $C_c$ and $d D_{T_s} / d T_s$ evaluated at $T_s = 0$ will be equal to $D_c$. This is because $C_c$ and $D_c$ form the measurement equation for instantaneous flows, which is what happens in the limit for flows over a sample period $T_s$ as $T_s \rightarrow 0$ normalized by $T_s$.
  4. If as $t \rightarrow \infty,\; g(t) \rightarrow \overline{g} > 0$ (where $\overline{g} \equiv$ the steady state value of g(t)) then as $T_s \rightarrow \infty$ we should have $SIM_{T_s}$ flows also going to $\infty$ because we're integrating over an infinite window of the non-zero steady sate of the model.
  5. If as $t \rightarrow \infty,\; g(t) \rightarrow \overline{g} > 0$ then as $T_s \rightarrow \infty$ we should have $SIM_{T_s}$ flows averaged over an interval of length $T_s$ going to the steady state value of the flows divided by $T_{s_0}$.

------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
  1. When $T_s = T_{s_0}$ it reduces to the original $SIM_d$ model.
  2. At $T_s = 0$ the flows of $SIM_{T_s}$ will also be $0$ since the integration time will be $0$, and thus $C_{T_s} = 0$ and $D_{T_s} = 0$
  3.  $d C_{T_s} / d T_s$ evaluated at $T_s = 0$ will be equal to $C_c$ and $d D_{T_s} / d T_s$ evaluated at $T_s = 0$ will be equal to $D_c$. This is because $C_c$ and $D_c$ form the measurement equation for instantaneous flows, which is what happens in the limit for flows over a sample period $T_s$ as $T_s \rightarrow 0$ normalized by $T_s$.
  4. If as $t \rightarrow \infty,\; g(t) \rightarrow \overline{g} > 0$ (where $\overline{g} \equiv$ the steady state value of g(t)) then as $T_s \rightarrow \infty$ we should have $SIM_{T_s}$ flows also going to $\infty$ because we're integrating over an infinite window of the non-zero steady sate of the model.
  5. If as $t \rightarrow \infty,\; g(t) \rightarrow \overline{g} > 0$ then as $T_s \rightarrow \infty$ we should have $SIM_{T_s}$ flows averaged over an interval of length $T_s$ going to the steady state value of the flows divided by $T_{s_0}$.
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------




20 comments :

  1. Jason, instead of this:
    $$\frac{A}{A_{0}} = \frac{c}{1-k} \frac{B}{B_{0}} + \left( \frac{B}{B_{0}} \right)^k \tag 1$$
    I get this:
    $$\frac{A}{A_{0}} = \frac{c}{1-k} \frac{B}{A_{0}} + \left( \frac{B}{B_{0}} \right)^k \tag 2$$

    ReplyDelete
  2. I see MathJax is working for you! Great. For SIM with the sample period (i.e. time step) $T_s = 1$ "period" (as G&L specify), then for convenience if we define the constant:
    $$X \equiv 1-\alpha_1 (1-\theta) \tag 1$$
    then the discrete time state space system equations are:
    $$
    \begin{align}
    H_{n+1} & = A\, H_n + B\, G_{n+1} \quad \text{(state update equation)} \tag 2\\
    Z_{n+1} & = C_Z\, H_n + D_Z\, G_{n+1} \quad \text{(measurement equation)} \tag 3\\
    \\
    \text{where} \\
    \\
    A & = \alpha_2 \theta / X \tag 4\\
    B & = \theta / X \tag 5\\
    Z_{n} & = \begin{bmatrix} Y_n & T_n & Y_{Dn} & C_n \end{bmatrix}^T \quad \text{(measurement vector)} \tag 6\\
    C_Z & = \begin{bmatrix} \frac{\alpha_2}{X} & \frac{\alpha_2 \theta}{X} & \frac{\alpha_2 (1-\theta)}{X} & \frac{\alpha_2}{X} \end{bmatrix}^T \tag 7\\
    D_Z & = \begin{bmatrix} \frac{1}{X} & \frac{\theta}{X} & \frac{(1-\theta)}{X} & \frac{1 - X}{X}\end{bmatrix}^T \tag 8
    \end{align}
    $$

    ReplyDelete
  3. $$ \bbox[border:2px solid red]
    {
    e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n
    \qquad (2)
    }
    $$

    ReplyDelete
  4. $$ \bbox[yellow]
    {
    e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n
    \qquad (1)
    }
    $$

    ReplyDelete
  5. $\require{AMScd}$
    \begin{CD}
    A @>>> B @>{\text{very long label}}>> C \\
    @. @AAA @| \\
    D @= E @<<< F
    \end{CD}

    ReplyDelete
  6. $\require{AMScd}$
    \begin{CD}
    @<<< @<<< \bigoplus @<<< B @<<< u(t) \\
    @VVV @. @. @. @AAA \\
    @>>> z^{-1} @>>> @>>> A @>>> \\
    @. @. @VVV @. @.
    \end{CD}

    ReplyDelete
  7. $\require{AMScd}$
    \begin{CD}
    @<<< @<<< \bigoplus @<<< B @<<< u(t) \\
    @VVV @. @. @. @AAA \\
    @>>> \bbox[border:2px solid red] {z^{-1}} @>>> @>>> A @>>> \\
    @. @. @VVV @. @.
    \end{CD}

    ReplyDelete
  8. $\require{AMScd}$
    \begin{CD}
    @<<< @<<< \bigoplus @<<< B @<<< u(t) \\
    @VVV @. @. @. @AAA \\
    @>>> \bbox[border:2px solid black] {z^{-1}} @>>> @>>> A @>>> \\
    @. @. @VVV @. @.
    \end{CD}

    ReplyDelete
  9. $\color{green}{\text{This sentence should be green}}$

    ReplyDelete
  10. $\require{AMScd}$
    \begin{CD}
    @<<< \bbox[border:2px solid black] {z^{+1}} @<<<
    \end{CD}

    ReplyDelete
  11. $\require{AMScd}$
    \begin{CD}
    @<<< \bbox[border:2px solid black] {\stackrel{advance by 1}z^{+1}} @<<<
    \end{CD}

    ReplyDelete

  12. $A \underset{\text{below}}{\overset{\text{above}}{+}} C$

    ReplyDelete
  13. $\require{AMScd}$
    \begin{CD}
    @<<< \bbox[yellow,border:2px solid black] {\underset{\text{by One}}{\overset{\text{Advance}}{Z^{+1}}}} @<<<
    \end{CD}
    Instead of the usual
    $\require{AMScd}$
    \begin{CD}
    @<<< \bbox[yellow,border:2px solid black] {\underset{\text{by One}}{\overset{\text{Delay}}{Z^{-1}}}} @<<<
    \end{CD}

    ReplyDelete


  14. Roger, I like your "One period time advance" block. If that's what I think it is i.e. a block that could be labeled like this:
    $\require{AMScd}$
    \begin{CD}
    x_{n+1} @<<< \bbox[yellow,border:2px solid black] {\underset{\text{by one}}{\overset{\text{Advance}}{Z^{+1}}}} @<<< x_{n}
    \end{CD}
    Instead of the usual
    $\require{AMScd}$
    \begin{CD}
    x_{n} @<<< \bbox[yellow,border:2px solid black] {\underset{\text{by one}}{\overset{\text{Delay}}{Z^{-1}}}} @<<< x_{n+1}
    \end{CD}
    Then I get what you're doing, and that's certainly a fair thing to do with a linear system conceptually. However it's not realizable... i.e. if we could do that in computers, they'd actually save time the more computations they did. ;)

    In the continuous time world, that's like an RLC circuit which starts to react before you apply an input voltage. Nothing wrong with it conceptually, but it is non-causual, and thus can't actually be constructed. Is that what you meant, or am I misreading you?

    ReplyDelete
  15. Let's get rid of that abomination:
    $$
    \require{cancel}
    \cancel{\dot{x}(t) = A X(s) + B U(z)}
    $$

    ReplyDelete
  16. Let's get rid of that abomination:
    $$
    \require{cancel}
    \enclose{updiagonalstrike,downdiagonalstrike}{\dot{x}(t) = A X(s) + B U(z)}
    $$

    ReplyDelete
  17. Let's get rid of that abomination:
    $$
    \require{enclose}
    \enclose{updiagonalstrike,downdiagonalstrike}{\dot{x}(t) = A X(s) + B U(z)}
    $$

    ReplyDelete
  18. I love me some $\$$ signs. I can't get enough $\$$ signs. $\$$ signs everywhere!

    ReplyDelete