0 valutazioniIl 0% ha trovato utile questo documento (0 voti)
33 visualizzazioni13 pagine
This document describes an experiment on solving linear differential equations for an RLC series circuit. The circuit diagram and governing differential equations are presented. Code is provided to numerically solve the equations for different input signals including DC, sine waves of varying frequencies, square waves, and triangular waves. Graphs of current, voltage drops across resistance, inductor and capacitor components are generated for each input case. Limitations in distorted curve shapes are noted which may be due to errors in implementing the numerical solution method.
This document describes an experiment on solving linear differential equations for an RLC series circuit. The circuit diagram and governing differential equations are presented. Code is provided to numerically solve the equations for different input signals including DC, sine waves of varying frequencies, square waves, and triangular waves. Graphs of current, voltage drops across resistance, inductor and capacitor components are generated for each input case. Limitations in distorted curve shapes are noted which may be due to errors in implementing the numerical solution method.
This document describes an experiment on solving linear differential equations for an RLC series circuit. The circuit diagram and governing differential equations are presented. Code is provided to numerically solve the equations for different input signals including DC, sine waves of varying frequencies, square waves, and triangular waves. Graphs of current, voltage drops across resistance, inductor and capacitor components are generated for each input case. Limitations in distorted curve shapes are noted which may be due to errors in implementing the numerical solution method.
Name of the Experiment: Solutions to Linear Differential Equation
Name: Shahnewaz Karim Sakib Date of performance: 15.09.2012 Section:A 2
Date of submission: 22.09.2012 Level/Term: 2/2 Department: EEE Partners Roll No: 0906056
The circuit can be drawn as below:
Applying Kirchoffs voltage rule we get, V1=IR+L(dI/dt)+(1/C)Idt Differentiating both side we get, (dV1/dt)=R(dI/dt)+L(d 2 I/dt 2 )+(I/C) Now, let (dI/dt)=z..(i) So, the previous equation becomes (dV1/dt)=Rz+L(dz/dt)+(I/C); (dz/dt) =(1/L)((dV1/dt)-Rz-(I/C))..(ii) Thus we got two differential equations. Solving these two equations simultaneously will result in the solution.
The values of circuit parameters of the RLC series circuit are: R =10 L =10mH C =1F The main code is given below: For frequency=10KHz close all; clear all; clc;
for j=1:length(time)-1 inew(j)=i(j)+(h*ypredic(time(j),i(j),z(j))); znew(j)=z(j)+(h*xpredic(time(j),i(j),z(j))); i(j+1)=i(j)+((h/ 2)*(ypredic(time(j),i(j),z(j))+ypredic(time(j+1),inew(j),znew(j)))); z(j+1)=z(j)+((h/ 2)*(xpredic(time(j),i(j),z(j))+xpredic(time(j+1),inew(j),znew(j)))); end
Two user defined function was used to generate znew and inew.
User defined function to generate znew:
(Assuming sinusoidal source with frequency of 10KHz)
Using this value of znew we have found the values of (dz/ dt) after each iteration. User defined function to generate xnew:
function ynew_09=ypredic(time,i,z) ynew_09=z; end
Using this value of xnew we have generated the value of z after each iteration.
Here,
VR=voltage across resistance VL=voltage across inductor VC=voltage across capacitor.
1. The source is DC:
Output curve: Output curve of I: Output curve of VR:
Output curve of VL:
Output curve of VC:
2. The source is sine wave (f=10KHz, Vpeak=1) Output curve of I:
Output curve of VR:
Output curve of VL:
Output curve of VC:
3. The source is sine wave (f=5KHz, Vpeak=1) Output curve for I:
Output curve for VR:
Output curve for VL:
Output curve for VC:
4. The source is sine wave (f=20KHz, vpeak=1) Output curve of I:
Output of VR:
Output curve of VL:
Output curve of VC:
5. The source is a 10 kHz square wave (peak value = 1 V, bipolar) Output Curve of I:
Output Curve of VR:
Output Curve of VL:
Output curve of VC:
6. The source is a 20 kHz triangular wave (peak value = 1 V, bipolar) Output curve of I:
Output curve of VR:
Output curve of VL:
Output curve of VC:
Limitation: The shape of some of the curves is distorted. There may be slight mistake in generating the source or getting the values of z or (di/ dz). This has caused this distortion.