2 views

Uploaded by Rebecca Bradford

eu

save

You are on page 1of 5

Matlab.

% The problem to be solved is:

%y''(t)+100*y'(t)+1E4*y(t)=1E4*abs(sin(377t))

h=0.0001;

t=0:h:0.08;

clear x;

**%h is the time step.
**

%initialize time variable.

%wipe out old variable.

**x(1,:)=[0 0]; %initial condition are zero.
**

%Note that x is two dimensional since there are two state variables.

for i=2:length(t),

%Set up "for" loop.

**%Calculate the values of k1 (note that it is a vector of length 2).
**

k1=[x(i-1,2) 1E4*abs(sin(377*t(i)))-100*x(i-1,2)-1E4*x(i-1,1)];

%Calculate derivatives;

x(i,:)=x(i-1,:)+k1*h;

%Estimate new value of x;

end

%Plot approximate and exact solution.

plot(t,x(:,1),'r',t,abs(sin(377*t)),'b');

legend('Output','Input');

title('Euler Approximation, Second order system');

xlabel('Time');

ylabel('Input and Output');

but it may not be obvious how to apply it to the approximation of differential equations of higher order. Let x1(t)=y(t). The circuit parameter are R=400. and Vm=1. L=4H. We will introduce two new variables. . The first thing we must do is to recast the problem in terms of first order equations. Note: this differential equation represents the rectifier circuit from section 7-3 of Circuits Devices and Systems.The Euler Method for Higher Order Differential Equations The method described above is often sufficient to approximate first order differential equations. These equations can also be expressed as a first order matrix equation. This technique is also called state variable analysis. Consider the differential equation: We will assume initial conditions are all zero. The trick here is to break down the higher order differential equation into several first order differential equations. but poses no particular problem for Euler's method. by Smith (your E11 text). Taking the absolute value of the sine wave is equivalent to rectification. This problem would be extremely hard to solve analytically. C=25F. and y(t) is equal to the output voltage. x1(t) and x2(t). =377 rad/sec(60 Hz). We can then write two coupled first order equations.

3) From this value find an approximate value for each xi*(to+h). . 4) Let to=to+h. Call these k1i. choose a value for h. x2(to). . 1) Starting at time to. and find initial conditions for all state variables x1(to).We can now use Euler's method to solve both first order equations simultaneously by following the following procedure (which is a simple modification of the procedure for first order equations).. and for each xi. let xi(to)=xi*(to+h). 5) Repeat steps 2 through 4 until the solution is finished. 2) From the values of xi(to) calculate derivatives for each xi(t) at t=to..

00001.:)=[0]. t=0:h:2.668*heaviside(t(i)-0.:)=x(i-1.1).5+(1/20))-heaviside(t(i)0. clear x. clear x y. for i=2:length(t) k1=[x(i-1.2)-208.:)+k1*h. t=0:h:2.001.5.1)].1).5. x(i.'r'). struja tacan kod h=0.1).6889*x(i-1. t=0:h:2.2612*x(i-1.1)]. end plot(t. clear x.001.:)+k1*h.'r').5)-39. Struja h=0.:)=[0 0]. y(i.2) 1712.:)+k1*h.6207*x(i1.2)-207. x(1.:)=[0 0].668*heaviside(t(i)-0.2222*10*heaviside(t(i)-0.2222*(1/(1/10)*(heaviside(t(i)-0.2) 1712.2)-208.2) 2.5)-39*y(i-1)-2.Brzina h=0. . for i=2:length(t) k1=[x(i-1. x(1. for i=2:length(t) k2=[2.6207*x(i1. end plot(t.:)=[0 0].:)=x(i-1. y(1.:)=x(i-1. end x(:. x(i.2612*x(i-1. x(i.2328*x(i-1.5)-39. for i=2:length(t) k1=[x(i-1.:)+k2*h. x(1.x(:.5-1/20))) -39*x(i-1.5.x(:.1)].:)=y(i-1.1)].

end plot(t.1).'r'). .y(:.

- Mws Mec Ode Txt Euler ExamplesUploaded byRonak Gupta
- ME 0051b cfd Rubrics.xlsxUploaded bySubramanian gokul
- Two Degree Non Homogenous Differential EquationsUploaded byTushar Gupta
- Midterm Test Sem 2, 1213Uploaded byBelleRz12
- MAT1322 November 2004 MidtermUploaded byDavid Lin
- De First OrderUploaded byRina Dwi Yani
- 22 Integration of Tresca and Mohr Coulomb Constitutive Relations in Plane Strain Elastoplasticity (1)Uploaded bySebastiao Silva
- zaldastani1953.pdfUploaded byAniket Sharma
- Ode Ppt EulerUploaded byazerai2000
- Murray R. Spiegel - Applied Differential Equations - Prentice-Hall, Inc. (1967)Uploaded byWDaron3005
- Comp ScienceUploaded byirc_avtar
- Lecture 19Uploaded bysofianina05
- 2009 CJCUploaded byPedma Kc
- Linear Algebra LectureUploaded byMuhammad Shahbaz Manzoor
- Calculus ChecarUploaded byhernandesz
- 8th a syllabusUploaded byapi-227641016
- Course Outline - BismathUploaded byGhazi Azhari
- te 804 te1 revisedUploaded byapi-285545346
- The Application of the Laplace TransformationUploaded byGuillermo Guzmán
- m7 ch12 solutions finalUploaded byapi-272721387

- Elektromehanička vremenska konstantaUploaded byRebecca Bradford
- 5.3 Statika ProracunUploaded byRebecca Bradford
- elektromotorni pogoniUploaded byRebecca Bradford
- Hybrid Solar Inverter Based on a Standard Power ElUploaded byRebecca Bradford
- Mjere Za Smanjenje Gubitaka u Dinamičkim StanjimaUploaded byRebecca Bradford
- Installer SettingsUploaded byRebecca Bradford
- Toplotne PumpeUploaded byRebecca Bradford
- Proracun_tokova_snaga(matlab)za zadacu.pdfUploaded byRebecca Bradford
- pripremna nastavaUploaded byRebecca Bradford
- Technical Report_PMF Banja LukaUploaded byRebecca Bradford
- AS-upRUploaded byRebecca Bradford
- Zajko_GradačacUploaded byRebecca Bradford
- Efikasnost Primjene Lizinoprila u Liječenju HipertenzijeUploaded byRebecca Bradford
- Seminarski Rad(Aidm) v2 KomentariUploaded byRebecca Bradford
- katalog1.pdfUploaded byRebecca Bradford
- GRADMONT GRADACACUploaded byRebecca Bradford
- elektrana banoviciUploaded byRebecca Bradford
- Klima UređajiUploaded byRebecca Bradford
- Elektrane .pdfUploaded byRebecca Bradford
- Fotonaponska elektrana povezana sa mrežom.docxUploaded byRebecca Bradford
- Elektrane .pdfUploaded byRebecca Bradford

- Risoluzione Video e Bit Rate IdealeUploaded byguabat
- Manual de Motivacion y EmocionUploaded byYossi Hurtado Vasquez
- Camping and Outdoor Program GuideUploaded byJohn Alexander Gallin
- clase 2-Aspectos generalidades.pptxUploaded bylucasergio
- O Princípio Da Separação Dos PoderesUploaded byVladimir Feijo
- maths testUploaded byGildaMarisa
- Ethical Issues in Stem Cell ResearchUploaded byOscar Lau
- Protocolo Conformacion Comite Mantenimiento Veedor 2017Uploaded byManuel Ramos Ccuno
- Principios de Economía TP 1 Siglo 21Uploaded bylean
- Geometria MetricaUploaded byAnonymous ZAuWf2
- Trabajo de Grado de Jose y JoelUploaded byJose Gregorio Vergara Rodriguez
- TFG Garcia Bernal RobertoUploaded byRodrigo Alcocer
- Vibraciones de La SartaUploaded byGus Zalles Arrieta
- Algunas kriyas y meditaciones.pdfUploaded bysalud23
- chronic recurent multifocal osteomyelitis power pointUploaded byapi-299993381
- Manual de Instalaciones Electricas en BT 2009Uploaded byJaime Andres Quijano Cossio
- PDF Wagner RING 4e 2011-CwkUploaded bypetitmozart
- Análise de Fadiga de Estruturas OceânicasUploaded byJorge Silva
- 7_ Donación de Órganos Sangre y Tejidos 2015 v2Uploaded byLeslie Katherine Arancibia Guzmàn
- A Universidade Brasileira e o PNEUploaded byEmerson Duarte Monte
- CLASE 15 Conrad-Esquizofrenia 1Uploaded byFrancisca Morales Etcheberry
- Para que sirve la filosofia - Comesana, Manuel.pdfUploaded byenrme
- Cours Econometrie Finance TdUploaded byfaten_chtourou
- PPC_PROCESO_14-11-2661865_115001006_10585870Uploaded bygcdint3
- Analisis NodalUploaded byJhoana Hurtado Cáceres
- Resistencia mecánica de ladrillos preparados con mezclas de arcilla y lodos provenientes del tratamiento de aguas residuales .pdfUploaded byAndy Olivera
- Tecnologia en La EducacionUploaded byJordan C. Alayo
- TS-EMF_dat_enUploaded byRajesh Mishra
- La Crisis Del 30, Cachanosky - Revista LibertasUploaded byLuis Vilches
- Lesson 1 IGC NeboshUploaded byQaiser Waseem