Download presentation

Presentation is loading. Please wait.

Published byYesenia Gunnison Modified over 2 years ago

1
CHAPTER 8 RESPONSE OF SECOND ORDER RLC CIRCUITS MATLAB EXAMPLES

2
SYMBOLIC TOOL BOX-1 «syms t» «dsolve» «subs» «ezplot» Will be shown for the two cases One differential equation with second degree Two differential equations each with firsrt degree

3
SYMBOLIC TOOL BOX-2 «Notebook»version available Will be shown for the two cases One differential equation with second degree requires one-unknown-variable-initial condition and also its derivative initial condition.needs calculation Two differential equations each with firsrt degree Capacitors voltage and inductors current initial conditions are sufficient.no calculation

4
COMPARISON (dsolve, ode45) «dsolve», symbolic toolbox Applicable both Higher order single dif equation and Set of first oerder dif equation RLC values can be chosen as parameters, easy handle, plot tspan could be changed «ode45», matlab command Applicable only Set of first oerder dif equation RLC values can be chosen as parameters requires nested function m-file change Plot tspan is in m file

5
MATLAB-ODE-1 (Ordinary Differential Equations) Ode In general «ode45» is preferrable MATLAB «ode» solvers accept only first- order differential equations Otherwise higher degre equations should be transferred to this form Plot (t,w1,t,w2..) This examples will be given in this presentation, since «notebook» not accepted for these commands

6
MATLAB-ODE-2 (Ordinary Differential Equations) These «ode» commands require predefined functions as m-files. File/new/function Two alternatives Coeffecients are given values Given RLC values are assigned to the dif. Equation coeffecients defined in the predefined m-file function. Coeffecients are given as parameters Predefined Nested functions

7
PARALLEL SECOND ORDER RLC CIRCUIT I0I0 +V0_+V0_ One second order differential equation V c (0) and [dv c /dt](0) Required «For dsolve only» Two first order differential equations V c (0) and i L (0) required This set should be used for «ode» commands

8
PREDEFINED M-FILE FUNCTION Following function is defined (predefined function,R=200,C=0.2µ,L=50mH, I=1A) file/new/function function dy = RLCparalel( t,y ) dy=zeros(2,1); (2 row, 1 column) dy(1)=-25*10^3*y(1)-5*10^6*y(2)+5*10^6; dy(2)=20*y(1); end y(1)=v c capacitor voltage: Of which coefecients are 25*10^3(1/RC, while c=0.2uF, R=200 ohm)in the first equation and 5*10^6 (1/L, L=50m mH) in the second equation, y(2)=i L inductor current Of which coefecients are 10000(1/C, C=100µ) in the first equation, and (0) in the second equation For various R,L,C and source values, predefined function should be renewed

9
«ode45» command [t 10], [12 3*10^-2]); plot(t,y(:,2)) For all t vaues Second solution function which is incudtors current Initial conditions: Vc(0)=12V, İL(0)=30mA Time span You could draw the first function also on the same figure by adding t,y(:,1) to the plot command arguments

10
SOLUTION FIGURE

11
PREDEFINED NESTED FUNCTION(ode 45) function [t,x] = solve_paralelRLC( R,L,C ) t=[0,0.01]; x0=[8;1]; function dxdt=paralelRLC(t,x) dxdt=[-(1/(R*C))*x(1)-(1/C)*x(2)+1;(1/L)*x(1)]; end %UNTİTLED Summary of this function goes here % Detailed explanation goes here end

12
NESTED PARAMETRIC SOLUTION(ode45) >> [t,x]=solve_paralelRLC(10,0.1, ); >> plot(t,x)

13
REMARKS FOR NESTED PARAMETRIC SOLUTION(ode45) «tspan» could only be changed in m- file, not in plot command (this is required for a visible transient solution)

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google