Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 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 thisStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started