Find the ordinary differential equation relating a current source i s (t) = cos(? 0 t) with
Question:
Find the ordinary differential equation relating a current source is(t) = cos(?0t) with the current iL(t) in an inductor, with inductance L = 1 Henry, connected in parallel with a resistor of R = 1? ?(see Figure 0.23). Assume a zero initial current in the inductor.
(a)?Obtain a discrete equation from the ordinary differential equation using the trapezoidal approximation of an integral.
(b) Create a MATLAB script to solve the difference equation for Ts = 0.01 and for three frequencies for is(t), ?0 = 0.005?, 0.05?, and 0.5?. Plot the input current source is(t) and the approximate solution iL(nTs) in the same figure. Use the MATLAB function plot. Use the MATLAB function filterto solve the difference equation (use helpto learn about filter).
(c) Solve the ordinary differential equation using symbolic MATLAB when the input frequency is ?0 = 0.5?. Compare is(t) and iL(t).
Figure 0.23:
?
Step by Step Answer: