- #1
shuh
- 9
- 0
Homework Statement
The state space model of a nonlinear system is [tex]x'_1(t) = 2x^2_2(t) - 50[/tex] [tex]x'_2(t) = -x_1(t) - 3x_2(t) + u(t)[/tex] where x_1(t) and x_2(t) are the states, and u(t) is the input. The output of the system is x_2(t).
Find the zero input response (u(t) = 0) of this system linearized at the equilibrium point (-15, 5) with initial states (-14.5, 5). Use Matlab (expm.m) to plot these state responses from 0 to 5s.
Homework Equations
State Space Modeling, Matlab
The Attempt at a Solution
The bold part is where I have an issue with this problem. Generally, if you want to find response to initial conditions, you use initial function, not expm. Expm simply takes a matrix and exponentiates it.
Anyways, MATLAB code for generating response to initial condition is:
//State Matrix
A = [ 0 20 ; -1 -3]
B = [0 ; 1]
C = [0 1]
D = 0
x0 = [ -14.5 ; 5]
sys = ss(A,B,C,d)
initial(sys, x0)
And you get a beautiful plot looking like the following:
How, and especially why on Earth would you use expm function to generate such plot?