Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Derive an expression for the impulse response of the system with zero initial

ID: 2073256 • Letter: 1

Question

1. Derive an expression for the impulse response of the system with zero initial conditions, sketch this response and compare it to the response predicted using MATLAB 2. A second system has the transfer function g2(s) s2+(K1+K2)s+K1K2 the step response of this system and use the Zeigler-Nichols Reaction Curve method to determine the approximate parameters for a PID controller. Using MATLAB plot the step response of the system with this PID controller and determine the values of the percentage overshoot, 5% settling time and steady state error. By adjusting the PID parameters, attempt to improve the step response of the system 3. A third system g3(s) is formed into a closed loop system as shown s(s2+(K1+K2)s+K1K2) below R(s)t Y(s) Sketch the root locus for this system and compare your sketch to the plot generated using MATLAB 4. Determine the value of gain, k which would lead to marginal stability. Using MATLAB, plot the 4 marks] impulse response of the closed loop system with this value of gain. Comment on this response

Explanation / Answer

The secret to obtaining impulse responses lies in using the initial conditions that arise from impulse input. This approach allows the zero time duration of the impulse to be correctly modeled, rather than using an input signal of [1 0 0 0 ...].

Consider the following proof:

For the impulse response, u is a delta function which has an area of one from -inf to +inf. So,

We want to determine the value of x at t = 0 (i.e., the initial conditions that correspond to an impulse). Assume that from t = -inf to t = 0, x = 0. The result is that a*int(x) can be evaluated from 0 to time t. We are interested in the initial condition (t = 0), which leaves a*int(x)dt to be evaluated from t = 0 to t = 0.

The result is:

and

Therefore, an impulse may be simulated by using an input of all zeros and initial conditions of b.

At first an appropriate state space model has to be defined:

The following examples demonstrate various methods of obtaining impulse responses for the system.

1) Using the impulse command:

2) Using the lsim command:

3) Using the ode45 command:

Define the MATLAB file for the derivatives (see attachment 'fun.m'):

Evaluate the function from t = 0 to t = 6:

4) Using SIMULINK:

Remark: Additional to the description below, an appropriate Simulink (R2011b) model is attached, named 'obtain_impulse_response.mdl'. (You can directly start with point f, using this model)

a) Using a State-Space block, enter the a, b, c, and d matrices from above.

b) Specify b as the initial condition.

c) Use a constant input of zero and send the output to the workspace (use y4 as the return variable).

d) In the Simulation / Configuration Parameters / Data Import/Export enter t4 as the return variable for the simulations time vector.

e) Set the initial step size (in Solver Configuration Parameters) to 0.01 and the maximum step size to 0.1 and use the ode45 algorithm with a stop time of 6.

f) Run the simulation and plot t4 versus y4: