Skip to content

Commit

Permalink
Update ode_1st_h_he_pole_level_854944693E.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
fs446 committed May 14, 2024
1 parent d76a926 commit 8e43fba
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions system_properties_ct/ode_1st_h_he_pole_level_854944693E.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"\n",
"$$T_{RC} y'(t) + y(t) = x(t)$$\n",
"\n",
"varying $T_{RC}=\\frac{1}{\\omega_g}$. We assume a causal system, i.e. for Laplace domain the region of convergence is $\\Re\\{s\\}>\\omega_g$."
"varying $T_{RC}=\\frac{1}{\\omega_{RC}}$. We assume a causal system, i.e. for Laplace domain the region of convergence is $\\Re\\{s\\}>\\omega_{RC}$."
]
},
{
Expand Down Expand Up @@ -63,13 +63,13 @@
"metadata": {},
"outputs": [],
"source": [
"T_RC = np.array([2/7, 1/2, 1, 2, 5]) # in s\n",
"wg = 1/T_RC # in rad/s\n",
"fg = wg / 2 / np.pi # in Hz\n",
"T_RC_str = ['2/7 s', '1/2 s', '1 s', '2 s',\n",
" r'$T_{RC} = \\omega_{g}^{-1}$ = 5 s']\n",
"wg_str = ['7/2 rad/s', '2 rad/s', '1 rad/s', '1/2 rad/s',\n",
" r'$\\omega_{g} = T_{RC}^{-1}$ = 1/5 rad/s']"
"T_RC = np.array([1/4, 1/2, 1, 2, 5]) # in s\n",
"w_RC = 1/T_RC # in rad/s\n",
"fg = w_RC / 2 / np.pi # in Hz\n",
"T_RC_str = ['1/4 s', '1/2 s', '1 s', '2 s',\n",
" r'$T_{RC} = \\omega_{RC}^{-1}$ = 5 s']\n",
"wg_str = ['4 rad/s', '2 rad/s', '1 rad/s', '1/2 rad/s',\n",
" r'$\\omega_{RC} = T_{RC}^{-1}$ = 1/5 rad/s']"
]
},
{
Expand All @@ -92,9 +92,11 @@
"\n",
" plt.subplot(2, 2, 2)\n",
" plt.plot(t, he)\n",
" plt.plot(t, t*0+(1-np.exp(-1)), 'C7-')\n",
" plt.xlabel('t / s'), plt.ylabel(r'$h_\\epsilon(t)$'), plt.grid(True)\n",
" plt.axis([0, 10, 0, 1.1]), plt.title('step response')\n",
"\n",
" plt.xticks([1/2,1,2,5])\n",
" \n",
" plt.subplot(2, 2, 3)\n",
" plt.plot(-1/tau, 0, 'x', ms=10, mew=3)\n",
" plt.xlabel(r'$\\Re(s)$ / (rad/s)'), plt.ylabel(r'$\\Im(s)$ / (rad/s)')\n",
Expand All @@ -103,9 +105,9 @@
"\n",
" ax_bode = plt.subplot(2, 2, 4)\n",
" plt.semilogx(w, level_dB)\n",
" plt.xlabel(r'$\\omega$ / (rad/s)'), plt.ylabel(r'dB'), plt.grid(True)\n",
" plt.xlabel(r'$\\omega$ / (rad/s)'), plt.ylabel(r'L / dB'), plt.grid(True, which='both')\n",
" plt.axis([1e-2, 2e1, -30, 10]), plt.title('level over angular frequency')\n",
"plt.semilogx(w, w*0-10*np.log10(2), 'C7')\n",
" plt.semilogx(w, w*0-10*np.log10(2), 'C7')\n",
"ax_h.legend(T_RC_str)\n",
"ax_bode.legend(wg_str)\n",
"plt.tight_layout()"
Expand Down

0 comments on commit 8e43fba

Please sign in to comment.