Starting from:
$30

$24

Systems and Signals Term Project Solution

Project Description

The goal of this project is to use MATLAB as a computational tool in signals and systems analysis. In particular, we will use MATLAB to verify the analytical results as well as to present results graphically.
The project has two parts. In Part I, a closed-loop control system is considered and the goal is to find the condition under which the system becomes stable. This part requires knowledge of Laplace transform and system stability. In Part II, we then analyze the frequency response of the control system in Part I. This part requires the knowledge of Fourier series and transform.

Report Format and Submission

For each step, write 1) mathematical analysis as you did in all your homeworks if it is required, 2) MATLAB code that computes the required result and all accompanying plots, and 3) explain if there is a mismatch between analytical and MATLAB results. Save the report as one PDF file and submit the report on Gradescope by March 18.

Part I: Laplace Analysis of a Closed-loop Control System

Closed-loop control systems, also known as feedback systems, are used in automated engineering sys-tems to achieve or maintain the desired output condition. One of the main advantages of closed-loop control systems is that they can stabilize unstable systems. In this part of the project, we will consider a simple feedback system that stabilizes a cascade of two systems.

Consider a cascade of two LTI systems S = S1S2 depicted in Figure 1. The cascade system has the input x(t) and the output y(t). Negative feedback with gain K ∈ R is used to stabilize the system. Let h(t) and H(s) denote the impulse response function and the transfer function of the whole system, respectively.

The input-output relationships of S1 and S2 systems are given below. Note that z(t) is the output of
S1 and the input to S2:

z(t) = dtdx(t) − x(t)

t
y(t) =    z(τ)e4(τ−t)dτ
−∞

Step 1)    a) Find an expression for H(s) as a function of K, H1(s), and H2(s).

1














Figure 1: Cascaded system with negative feedback.

    b) Find expressions for the transfer functions of S1 and S2, H1(s) and H2(s) respectively.

    c) Find the expression for the transfer function H(s) of the whole feedback system.

    d) Find the range of all values of gain K for which the system is stable.

    e) Choose arbitrary gains K1 and K2 such that the system unstable with gain K1 and stable with gain K2. Then, use MATLAB to show pole-zero plots of the transfer function H(s) when K = K1 and when K = K2.


Hint: You can use build-in function “pzplot” for pole-zero plot. For example, if system has transfer function H(s) = s2+s+2 , the following code to generate the plot:




    • sys = tf([2 1],[1 1 2]);

2    % Argument [2, 1] defines the coefficients of numerator ...

polynomial;

3    % Argument [1, 1, 2] defines the coefficients of denominator ...

polynomial;


4    h = pzplot(sys);

5


Step 2)    a) If the input is

1 ,  0 ≤ t ≤ 3
x(t) =    2
0,    otherwise

use MATLAB to plot the output y(t) for t ∈ [0, 10] when the system is unstable with K = K1 from Step 1c, and when the system is stable with K = K2 from Step 1c.

    b) Use MATLAB to plot the step response function g(t) for t ∈ [0, 10] in two cases: when the system is unstable with K = K1 from Step 1c, and when the system is stable with K = K2 from Step 1c.

Hint: You can use built-in function “conv” to compute convolution integral. For example, if x(t) = e−t, t ∈ [0, 2] and h(t) = t, t ∈ [0, 10], the following code plots the output y(t) = x(t) ∗ h(t) for t ∈ [0, 11].




2

    • Ts = 0.01;

2    xtime = 0:Ts:2;

3    htime = 0:Ts:10;

    • x = exp(-xtime);

5
h = htime;
6
y = conv(x, h)*Ts;
7
ytime = (0:length(y)-1)*Ts;
8
plot(ytime,y)
9
xlim([0 11])
10


Alternatively, you can use inbuilt MATLAB function “step” to get g(t).


Part II: Control System Frequency Response using the Fourier Series and Transform

Control systems often need to analyze the response of the system to steady state oscillations at the input, or the system’s frequency response. To test this, we will use the Fourier transform of the system impulse response. Additionally, we will use the Fourier series or Fourier transform to study the system response to a couple different inputs.

Step 3)    a) Assume K = 2. Find the Fourier transform of the system impulse response H(ω).

    b) Using MATLAB, plot the magnitude and phase spectrum of the system impulse response

over the range −5 · 2π ≤ ω ≤ 5 · 2π. This represents the frequency response characteristics of the feedback system.

    c) Describe the difference in the magnitude of the system response for low and high frequency inputs. Is one more heavily attenuated (i.e. reduced in magnitude) than the other?

Step 4)    a) We know one possible input to the system is the periodic signal a(t). One period of the signal (4 seconds) is described below:

t ,  0 ≤ t < 2

a1(t) =    2
1,    2 ≤ t < 4

Analytically find the Fourier series representation of this input a(t).

    b) Using MATLAB, plot the magnitude and phase spectra of a(t) for −20 ≤ k ≤ 20.

    c) Find the Fourier series representation of the output of the system (Yk) with a(t) as the input.

    d) Using MATLAB, plot the magnitude and phase spectra for the output Yk.

    e) Using MATLAB, plot the approximation of ya(t) using 41 harmonics over the time range 0 ≤ t ≤ 12. On the same axes, plot the original signal a(t).





3

More products