A state space linear system is shown below. Use Matlab to solve the following problems.
Requirement for project report: (1) Results; (2) Matlab code.
dx1/dt=-x1(t)+u(t)
dx2/dt=x1(t)-2x2(t)-x3(t)+3u(t)
dx3/dt=-3x3(t)
y(t)=-x1(t)+2x2(t)+x3(t)+u(t)
(1) Assume the system has input u(t)=e-3t if t>t0 and zero initial state x(0)=[0;0;0]. Using the transition matrix obtained, compute the system’s output (analytical solution), and plot the output as a function of time (t within 0 to 10).
(2) Using the function lsim to simulate the system’s output (analytical solution), and plot the output as a function of time (t within 0 to 10). The system has input (u(t)=e-3t if t>0) and zero initial state x(0)=[0;0;0] .
(3) Compare results for Question (1) and (2).
matlab code:
clc;clear all;close all;
t=0:0.001:10;
y=0.5*(exp(-t))+4*(exp(-2*t))-3.5*(exp(-3*t)); % analytical
solution
figure
plot(t,y),grid; %plot of the analytical solution
title('analytical solution')
A=[-1 0 0;1 -2 -1;0 0 -3]
B=[1;3;0]
C=[-1 2 1]
D=[1]
sys=ss(A,B,C,D)
ip=exp(-3*t);
figure
lsim(sys,ip,t),grid
A state space linear system is shown below. Use Matlab to solve the following problems. Requirement...
. A linear, time invariant system is described as the following state equation and output equation, dx1/dt= -x1(t)+x2(t)+u(t) dx2/dt=-x1(t)-x2(t)+x3(t) dx3/dt=-2x2(t)+x3(t)-2u(t) y(t)=x1(t)+2x2(t)+2x3(t) re-write the state space equation as following, determine matrices A, B, C and D:dx/dt=Ax+Bu y(t)=Cx+Du(t)
1. A state space linear system is shown below. dx1(t)/dt=x1(t)+x2(t)-x3(t)+u1(t) dx2(t)/dt=--x3(t)-u1(t) dx3(t)/dt=-x3(t)-u2(t) y(t)=-x1(t)+x3(t) (1) Re-write the state space equation as following, determine matrices A, B, C and D dx(t)/at=Ax+Bu y(t)=Cx+Du (2) Determine the matrix Q that is Q=[B A*B (A^2)*B (A^3)*B L (A^(n-1)*B] (3) Determine if the rank of Q is n (n=3) and determine if the system is controllable
slove in Matlab AP2. A system is modeled by the following differential equation in which X(t) is the output and (() is the input: *+ 2x(t) + 5x(t) = 3u(t), x(0) = 0, X(t) = 2 a. Create a state-space representation of the system. b. Plot the following on the same figure for 0 st s 10 sec : i. the initial condition response (use the initial function) il the unit step response (use the step function) iii. the total...
Matlab Homework #4: Matlab Linear Systems Simulation 1.) Obtain the differential equation for the mechanical system shown below bi FLR) orce CN) voltege ) 2.) Obtain the differential equation for the electrical system shown below shown below OAF 3.) Find the transfer functions corresponding to the differential equations found in questions I and 2 the 4) Let the input force applied to the block of the mechanical system be zero U)-のThe initial conditions are y(0) = 10 cm and dy(0)d-0....
solve by matlab The damping system has a single degree of freedom as follows: dx2 dx mo++ kx = F(t) dt dt The second ordinary differential equation can be divided to two 1sorder differential equation as: dx dx F C k xí -X2 -X1 dt dt m m m = x2 ,x'z m N F = 10, m = 5 kg k = 40, and the damping constant = 0.1 The initial conditions are [00] and the time interval is...
3. (25 points) For parts a & b, determine the state space representation and write the matlab code to solve the transfer function a. The circuit below where the input is v, and the output is Va 500 mF V, LX 0 b. A system is represented by the differential equation below where the output is y() and the input is z(). 440180 + 5y0) 2) d' y(t) dr d y(t) dt ontpm ria bles 2L 3. (25 points) For...
using matlab The damping system has a single degree of freedom as follows: dx2 dx m++ kx = + kx = F(t) dt dt The second ordinary differential equation can be divided to two 1st order differential equation as: dx dx F с k x1 = = x2 ,X'2 X2 -X1 dt dt m m m m N F = 10, m = 5 kg k = 40, and the damping constant = 0.1 The initial conditions are [0 0]...
WRITE MATLAB CODE FOR IT. Task 02: For the circuit shown in figure 12.2, the input voltage is Vi(t)-10 cos(2t) u(t) I. Plot the steady state output voltage voss(t) for t > 0 assuming zero initial conditions. I1. Determine whether the system is stable or mot? 0.5 F 2 Ohm v(t) Vo (t) 1 Ohm Figure 12.2
a can be skipped Consider the following second-order ODE representing a spring-mass-damper system for zero initial conditions (forced response): 2x + 2x + x=u, x(0) = 0, *(0) = 0 where u is the Unit Step Function (of magnitude 1). a. Use MATLAB to obtain an analytical solution x(t) for the differential equation, using the Laplace Transforms approach (do not use DSOLVE). Obtain the analytical expression for x(t). Also obtain a plot of .x(t) (for a simulation of 14 seconds)...
3. Consider a system with the following state equation h(t)] [0 0 21 [X1(t) [x1(t) y(t) [0.1 0 0.1x2(t) X3(t) The unit step response is required to have a settling time of less than 2 seconds and a percent overshoot of less than 5%. In addition a zero steady-state error is needed. The goal is to design the state feedback control law in the form of u(t) Kx(t) + Gr(t) (a) Find the desired regon of the S-plane for two...