CMPSC 200 10 D State Space Example 1
Автор: Joseph Mahoney
Загружено: 2015-07-27
Просмотров: 146
Описание:
Convert a 2nd-Order ODE to State Space Form for MATLAB (ODE Solvers) | 4y'' - 2y' + 7y = 3 sin(t)
In this example, you will learn how to rewrite a second-order ordinary differential equation (ODE) as a first-order state space system so you can solve it in MATLAB using standard ODE solvers (like ODE45). This is a core workflow in system dynamics, controls, and numerical simulation.
ODE given:
4*y''(t) - 2*y'(t) + 7*y(t) = 3*sin(t)
Step 1: Choose state variables (one per order)
x1 = y
x2 = y'
Step 2: Write the state derivatives
x1' = x2
Start from 4*x2' - 2*x2 + 7*x1 = 3*sin(t)
Solve for x2':
x2' = (-7/4)*x1 + (1/2)*x2 + (3/4)*sin(t)
State space form (matrix form you can code directly):
x' = A*x + B*u(t)
where x = [x1; x2], u(t) = sin(t)
A = [0 1; -7/4 1/2]
B = [0; 3/4]
and y = x1, y' = x2
More ODE and MATLAB resources (course page):
(https://sites.google.com/view/jmm-mat...)
Related videos from this channel:
Analytical Solution to an ODE I: ( • CMPSC 200 10 A Analytical Solution to an O... )
Analytical Solution to an ODE II: ( • CMPSC 200 10 B Analytical Solution to an O... )
Solving ODEs Numerically: ( • CMPSC 200 10 C Solving ODEs numerically )
State Space Example 1: ( • CMPSC 200 10 D State Space Example 1 )
State Space Example 2: ( • CMPSC 200 10 E State Space Example 2 )
Using ODE45 in MATLAB: ( • CMPSC 200 10 F Using ODE45: how to use ODE... )
ODE45 Example I: ( • CMPSC 200 10 G ODE45 Example I: solving ou... )
ME 357 Intro to State Space Modeling: ( • ME 357 09 A Introduction to State Space Mo... )
#MATLAB #StateSpace #DifferentialEquations #ODE45 #SystemDynamics #NumericalMethods
Timestamps
0:00 Goal: rewrite an ODE for MATLAB solving
0:11 Present the ODE and identify variables
0:32 Define state variables x1 and x2
1:18 Differentiate to relate x1' and x2'
1:46 Rewrite the ODE using state variables
2:57 Isolate x2' and simplify coefficients
3:54 Mapping equation x1' = x2
4:19 Final state equations ready to implement
4:44 What MATLAB will output: y and y' over time
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: