Answered step by step
Verified Expert Solution
Question
1 Approved Answer
We want to solve for the output y under the input signal u = sin(t) both analytically and numerically. The initial condition at time t0
We want to solve for the output y under the input signal u = sin(t) both analytically and numerically. The initial condition at time t0 = 0 is [1, 0, 1]T . In the questions below, we ask you to implement several numerical integration methods in MATLAB and observe how the choice of these methods can affect the solution.
Consider the following linear time-invariant system: xA=Ax+Bu,y=Cx+Du=000110011,B=001,C=[100],D=[0]. 2. The Euler method (or forward Euler method) is a first-order method based on the approximation x(t+t)=x(t)+tx(t)=x(t)+t(Ax+Bu) when t is small. Using MATLAB, find the numerical solutions of y with two different choices of t:t=0.05 and t=0.005. Plot both the numerical and analytical solutions. 3. Use the following "delayed" step rule x(t+t)=x(tt)+2tx(tt)=x(tt)+2t(Ax+Bu) to find the numerical solution of y with t=0.05 and t=0.005 in MATLAB and plot both the numerical and analytical solutions. For initial condition, assume that x at time (t) is the same as x at time 0. 4. The MATLAB function ode45 is based on an explicit Runge-Kutta (4,5) formula 1. Use ode45 to solve for y and plot both the numerical and analytical solutions. 5. Briefly describe how the choice of the step size t and the numerical integration method affects the accuracy of the solution. x(t)=2ettettetet+1ettettetetm(t) y(t)=1 f(t)=C(SIA)1x(0)+[CCSIA)1B+0]h =c(ettet)(1+s(x)t)+1 Consider the following linear time-invariant system: xA=Ax+Bu,y=Cx+Du=000110011,B=001,C=[100],D=[0]. 2. The Euler method (or forward Euler method) is a first-order method based on the approximation x(t+t)=x(t)+tx(t)=x(t)+t(Ax+Bu) when t is small. Using MATLAB, find the numerical solutions of y with two different choices of t:t=0.05 and t=0.005. Plot both the numerical and analytical solutions. 3. Use the following "delayed" step rule x(t+t)=x(tt)+2tx(tt)=x(tt)+2t(Ax+Bu) to find the numerical solution of y with t=0.05 and t=0.005 in MATLAB and plot both the numerical and analytical solutions. For initial condition, assume that x at time (t) is the same as x at time 0. 4. The MATLAB function ode45 is based on an explicit Runge-Kutta (4,5) formula 1. Use ode45 to solve for y and plot both the numerical and analytical solutions. 5. Briefly describe how the choice of the step size t and the numerical integration method affects the accuracy of the solution. x(t)=2ettettetet+1ettettetetm(t) y(t)=1 f(t)=C(SIA)1x(0)+[CCSIA)1B+0]h =c(ettet)(1+s(x)t)+1
Step 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