228k views
4 votes
Simulation of linear and nonlinear dynamic systems (a) For a linear dynamic system shown in state representation x˙=Ax+Bu,y = Cx+Du, we could use the MATLAB command lsim() for simulations. Suppose we have a linear system with 3 states (x1​,x2​ and x3​), with the dynamics

x1​=x2​,
x2​= x3​,
x3​= −2x1​−3x2​−6x3​+u​
Generate the response of the system under the input signal u=10.0∗sin(2π it), for t∈.

User Lbris
by
7.6k points

1 Answer

4 votes

Final answer:

To simulate the given linear system with 3 states and generate its response under the given input signal u=10.0*sin(2πt), you can use the MATLAB command lsim(). Follow the steps mentioned in the detailed answer for simulation.

Step-by-step explanation:

To generate the response of the system under the input signal u=10.0*sin(2πt), we need to simulate the given linear system with 3 states. The dynamics of the system are x1 = x2, x2 = x3, and x3 = -2x1 -3x2 -6x3 + u. We can use the MATLAB command lsim() to simulate the system. Here are the steps:

  1. Define the system matrices A, B, C, and D based on the given dynamics.
  2. Choose the time vector t for simulation.
  3. Create the input signal u = 10.0*sin(2πt).
  4. Simulate the system using the lsim() command: lsim(A, B, C, D, u, t).

The result will be the system response over the specified time range.

User Drachenfels
by
8.0k points