Question: Write the Matlab code for this problem Problem 5. Simulating dynamical systems in Matlab Read the Wikipedia page about Nu- merical methods for ordinary differential

Write the Matlab code for this problemWrite the Matlab code for this problem Problem 5. Simulating dynamical systems

Problem 5. Simulating dynamical systems in Matlab Read the Wikipedia page about Nu- merical methods for ordinary differential equations (https://en.wikipedia.org/wiki/ Numerical_methods_for_ordinary_differential_equations). In particular, you will be using the Euler method (sometimes called the forward Eiler method). Given the equations of motion from Problem 4, use the Euler method to simulate the behavior of the ODE for the following control inputs and initial conditions: a) Zero input, zero initial state: F(t) = 0, x(0) = 0, (0) = 0,0(0) = - pi/500, 7(0) = 0) b) Non-zero input, non-zero initial state: F(t) = 3 sin(0.1t), x(0) = 0), (0) = 0,0(0) = 7/2,0(0) = 0) c) EXTRA CREDIT (5 points) - Non-zero input, non-zero initial state: x(0) = 0, (0) = 0,0(0) = 77, 7(0) = 0. Find a sinusoid (amplitude, frequency, and phase) for input F(t) = Asin(wt+) that can cause the pendulum to swing at least halfway to vertical. Because we haven't addressed control systems yet, this is an exercise in parameter exploration. Plot the response of the system (x, 2 ,0) versus time for each of the cases in an interval from t = [0, 25). HINT: Make sure to make your time step, AT, small enough catch all of the system behavior. If changing your value of AT changes how the system behaves, then it is too big. I recommend trying something around 1millisecond to start with. NOTE: I posted supplemental lecture notes and matlab pseudocode to help you a ton with this problem. Problem 5. Simulating dynamical systems in Matlab Read the Wikipedia page about Nu- merical methods for ordinary differential equations (https://en.wikipedia.org/wiki/ Numerical_methods_for_ordinary_differential_equations). In particular, you will be using the Euler method (sometimes called the forward Eiler method). Given the equations of motion from Problem 4, use the Euler method to simulate the behavior of the ODE for the following control inputs and initial conditions: a) Zero input, zero initial state: F(t) = 0, x(0) = 0, (0) = 0,0(0) = - pi/500, 7(0) = 0) b) Non-zero input, non-zero initial state: F(t) = 3 sin(0.1t), x(0) = 0), (0) = 0,0(0) = 7/2,0(0) = 0) c) EXTRA CREDIT (5 points) - Non-zero input, non-zero initial state: x(0) = 0, (0) = 0,0(0) = 77, 7(0) = 0. Find a sinusoid (amplitude, frequency, and phase) for input F(t) = Asin(wt+) that can cause the pendulum to swing at least halfway to vertical. Because we haven't addressed control systems yet, this is an exercise in parameter exploration. Plot the response of the system (x, 2 ,0) versus time for each of the cases in an interval from t = [0, 25). HINT: Make sure to make your time step, AT, small enough catch all of the system behavior. If changing your value of AT changes how the system behaves, then it is too big. I recommend trying something around 1millisecond to start with. NOTE: I posted supplemental lecture notes and matlab pseudocode to help you a ton with this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!