Numerical Solution/Simulation

Slides:



Advertisements
Similar presentations
Math Review with Matlab:
Advertisements

Lab5 (Signal & System) Instructor: Anan Osothsilp Date: 20 Feb 07 Due Date 09 March 07.
ENGR-25_Chp6_Tutorial_PolyFit_J_S_rsq.pptx 1 Bruce Mayer, PE Engineering-25: Computational Methods Bruce Mayer, PE Licensed Electrical & Mechanical Engineer.
Start of Presentation Mathematical Modeling of Physical Systems © Prof. Dr. François E. Cellier September 20, st Homework Problem We wish to analyze.
Lesson 6: basic plots. Lesson 6 Outline: Plot 1-basic plot commands 1) Figure Line style Marker style Labels and Titles Axes Matlab help LineSpec (colors,
EGR106 Week 6 MATLAB FILES Two Dimensional Plots Multiple Plots
S. Mandayam/ ECOMMS/ECE Dept./Rowan University Electrical Communications Systems Spring 2005 Shreekanth Mandayam ECE Department Rowan University.
S. Mandayam/ ECOMMS/ECE Dept./Rowan University Electrical Communications Systems ECE Spring 2007 Shreekanth Mandayam ECE Department Rowan University.
Selected Differential System Examples from Lectures.
Area of a single trapezoid = h
SUNY-New Paltz Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz “Lecture 5”
Introduction to MATLAB adapted from Dr. Rolf Lakaemper.
Selected Differential System Examples from Lectures
Computational Methods for Design Lecture 4 – Introduction to Sensitivities John A. Burns C enter for O ptimal D esign A nd C ontrol I nterdisciplinary.
ESS 303 – Biomechanics Angular Kinetics. Angular or rotary inertia (AKA Moment of inertia): An object tends to resist a change in angular motion, a product.
MATLAB.
Dynamical Systems 2 Topological classification
Recap Sum and Product Functions Matrix Size Function Variance and Standard Deviation Random Numbers Complex Numbers.
Introduction to MATLAB adapted from Dr. Rolf Lakaemper.
Simpson’s Rule: Example: Calculate the integral of the given function.
Chapter Angular Position, Velocity, and Acceleration 10.2
Vibrations & Waves. In the example of a mass on a horizontal spring, m has a value of 0.80 kg and the spring constant, k, is 180 N/m. At time t = 0 the.
Signals and Systems 1 Lecture 3 Dr. Ali. A. Jalali August 23, 2002.
L – Modelling and Simulating Social Systems with MATLAB © ETH Zürich | Lesson 3 – Dynamical Systems Anders Johansson and Wenjian.
ME451 Kinematics and Dynamics of Machine Systems Numerical Integration. Stiffness: Implicit Methods. October 30, 2013 Radu Serban University of Wisconsin-Madison.
數值方法 2008, Applied Mathematics NDHU1 Chaos time series.
Homework 2 計財 張儷瀞. 1. Black-Scholes Model (Code) S0=30:1:70; X=50; r=0.08; sigma=0.4; for T=2:-0.25:0 [c, p]=blsprice(S0, X, r, T, sigma)
, Free vibration Eigenvalue equation EIGENVALUE EQUATION
EGR 115 Introduction to Computing for Engineers 2D Plotting – Part II Friday 19 Sept 2014 EGR 115 Introduction to Computing for Engineers.
ENGR-25_HW-01_Solution.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical.
ENGR-25_HW-01_Solution.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical.
Discrete-time Controller Design (Deadbeat & Dahlin Controllers)
1. Plotting Graph with Matlab:
Recent Updates: New Picosecond Pulsed Fiber Laser (PSL) By: Courtney Clarke.
© ETH Zürich | L – Modeling and Simulating Social Systems with MATLAB Lecture 3 – Dynamical Systems © ETH Zürich | Giovanni Luca.
Lesson 21: Methods of System Analysis
Lesson 22: Determining Control Stability Using Bode Plots
INTRODUCTION TO MATLAB
Electrical Communications Systems ECE Spring 2008
Modelling and Simulating Social Systems with MATLAB
L – Modeling and Simulating Social Systems with MATLAB
Sampling and Aliasing Prof. Brian L. Evans
Computer Application in Engineering Design
Chapter 2 Response to Harmonic Excitation
1. Plotting Graph with Matlab:
ZCE 111 Assignment 11.
EGR 115 Introduction to Computing for Engineers
Mechanical Engineering at Virginia Tech
MTE2 Review 2nd Order Transient Ckt
1. Plotting Graph with Matlab:
1. Plotting Graph with Matlab:
Critical Design Review
محاسبات عددی و برنامه نویسی
Lab-23 Chp10 Beam VM Diagrams By Calculus
SYSTEM OF DIFFERENTIAL EQUATIONS
Stair Caddy Sketch Model Review
._,.,._.,,,.., ,.,,,, _,....., ­ µ. qt......
MATHEMATICAL MODELING
SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS
An example of using euler.m
ECE 576 POWER SYSTEM DYNAMICS AND STABILITY
Homework-2.1: 1-DOF quarter car model.
1. Plotting Graph with Matlab:
Assignment 1: due 1/16/19 Estimate all of the zero of x3-x2-2x+1 graphically. Write a MatLab code for Newton’s method. Use your code to refine the graphical.
HOMEWORK 08B Impulse, step response Problem 1: Problem 2: Problem 3:
Control System Toolbox (Part-III)
(a) Find the PE at A PE = m g h = ( 500 kg )( 9.8 m/s2 )( 30 m )
SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS
Simulate Multiple Dice
1. Plotting Graph with Matlab:
Presentation transcript:

Numerical Solution/Simulation Euler Method, Applied to a Single 1st Order ODE q1(t)=x(t), m=0 kg, c=1Ns/m, k=5 N/m

A particular simulation with x(0)=q1(0)=0, and F(t)=u(t)=0, t<0, F(t)=u(t)=1 N, t>0

Euler Method, Applied to a Set of 1st Order ODE’s

q1(t)=x(t), q2(t)= x(t), m=1 kg, c=0.5Ns/m, k=1 N/m q1(0)=0, q2(0)=0

q1(0)=0 m, q2(0)= 0 m/s, F(t)=u(t)=0, t<0, F(t)=u(t)=1 N, t>0

Code Modules Required to Use ODE45 in Matlab

q1(t)=x(t), q2(t)= x(t), m=1 kg, c=0.5Ns/m, k=1 N/m q1(0)=0, q2(0)=0

N=5000; tend=100; t=linspace(0,tend,N); % Set up initial conditions for nonlinear model ics=[ 15 15 15 -15 -15 -15 ; ... -10 -8 -6 6 8 10 ]; % ics1=[ 10 5 -5 -10 ; ... % -10 -10 10 10 ]; %ics=[ics ics1]; for i1=1:6 xo=ics(:,i1) % Simulate Nonlinear Model [t,x]=ode45('InvPendNonlin',t,xo); % Plot simulation of nonlinear model subplot(2,1,1); plot(t,x(:,1),t,x(:,2)); %axis([0 tend -360 360 ]); xlabel('time (sec)'); ylabel('x1 (rad), x2 (rad/sec)'); title(['x1(0)=',num2str(xo(1)),'x2(0)=',num2str(xo(2))]); grid on; %hold on subplot(2,1,2); plot(x(:,1),x(:,2)); %axis([0 2000 0 50]); xlabel('x1 (rad)'); ylabel('x2(rad/sec)'); hold on; pause; end