Q1: Which of the following differential equations defines a Linear Time-Invariant (LTI) system?
dy
A) dt = t · x(t) − y(t)
dy
B) dt = x(t)2 + y(t)
𝐝𝐲
C) 𝐝𝐭 = −𝟑𝐲(𝐭) + 𝟐𝐱(𝐭)
dy
D) dt = −e𝑡 y(t) + x(t)
A and D are time-variant, and B is nonlinear
Q2: Consider the following first-order linear time-invariant (LTI) differential equation with an initial
condition:
𝐝𝐲(𝐭)
𝐝𝐭
+ 𝟑𝒚(𝒕) = 𝟔, with y(0) = 2
Which of the following MATLAB commands correctly uses dsolve to solve this equation
symbolically?
A) dsolve('Dy + 3*y = 6', 'y(0) = 2')
B) syms y(t); Dy = diff(y); dsolve(Dy + 3*y == 6, y(0) == 2)
C) syms y t; Dy = diff(y, t); dsolve(Dy + 3*y == 6, y(0) == 2)
D) syms y(t); dsolve(diff(y(t), t) + 3*y == 6, y(0) == 2)
A/B/C options fail due to improper symbolic setup or missing functional definition.
Q3: Given the following differential equation for a linear time-invariant (LTI) system:
𝐝𝟐 𝐲(𝐭) 𝐝𝐲(𝐭) 𝐝𝐱(𝐭)
+ 𝟒 + 𝟓𝐲(𝐭) = + 𝟐𝐱(𝐭)
𝐝𝐭 𝟐 𝐝𝐭 𝐝𝐭
Which of the following is the correct transfer function H(s) = Y(s)/X(s)
(𝐬+𝟐)
A) 𝐇(𝐬) =
𝐬 𝟐 +𝟒𝐬+𝟓
(𝑠+1)
B) 𝐻(𝑠) = 𝑠2 +4𝑠+5
(𝑠+2)
C) 𝐻(𝑠) = 𝑠2 +2𝑠+5
(s+2)
D) H(s) =
s2 +4s+6
Take Laplace transform.
Q4: Which of the following MATLAB commands correctly represents the transfer function from Q3?
A) tf([1 1], [1 4 5])
B) tf([1 2], [1 4 5])
C) tf([1 2], [1 2 5])
D) tf([1 2], [1 4 6])
Correct numerator and denominator vectors in MATLAB transfer function format.
Q5: For the transfer function obtained in Q3, which of the following MATLAB commands correctly
simulates and plots the time response of this system to an input u(t) = sin(t) over the interval t = 0
to 10?
A) lsim(tf([1 2], [1 2 5]), sin(t), t)
B) t = 0:0.01:10;
u = sin(t);
sys = tf([1 2], [1 4 5]);
lsim(sys, t, u)
C) t = 0:0.01:10;
u = sin(t);
sys = tf([1 2], [1 4 5]);
lsim(sys, u, t)
D) t = linspace(0,10,100);
sys = tf([1 2], [1 2 5]);
lsim(sys, sin(t), t)
A/B/D: Incorrect system definition or argument order.
Q6: For the system in Q3 which of the following MATLAB commands correctly creates its state-
space model?
A) A = [0 1; -4 -5];
B = [1; 0];
C = [1 2];
D = 0;
sys = ss(A, B, C, D);
B) A = [0 1; -5 -4];
B = [0; 1];
C = [2 1];
D = 0;
sys = ss(A, B, C, D);
C) A = [0 1; -5 -4];
B = [0; 1];
C = [1 2];
D = 0;
sys = ss(A, B, C, D);
D) A = [0 1; -5 -4];
B = [0; 1];
C = [1 0];
D = 1;
sys = ss(A, B, C, D);
A/C/D: Incorrect canonical form
Q7: Given the state space system (sys = ss(A, B, C, D)) in Q6, which of the following commands
will correctly simulate the step response of magnitude 5 over the time interval t = 0 to 10? (Select
all that apply)?
A) t = 0:0.01:10;
u = ones(size(t));
lsim(sys, u, t);
B) t = 0:0.01:10;
u = 5 * ones(size(t));
lsim(sys, u, t);
C) t = 0:0.01:10;
u = 5 * step(t);
lsim(sys, u, t);
D) step(5 * sys);
A: Only unit step
C: step(t) is not valid MATLAB input function
Q8: Given the state space system (sys = ss(A, B, C, D)) in Q6, which of the following MATLAB
commands will correctly simulate a step input of magnitude 5 starting at t = 5 seconds over the
interval t = 0 to 10? (Select all that apply)?
A) t = 0:0.01:10;
u = zeros(size(t));
u(t >= 5) = 5;
lsim(sys, u, t);
B) t = 0:0.01:10;
u = 5 * (t >= 5);
lsim(sys, u, t);
C) t = 0:0.01:10;
u = 5 * ones(size(t));
u(t < 5) = 0;
lsim(sys, u, t);
D) step(sys, 5);
D: step(sys, 5) sets duration, not delay
Q9: Consider a spring-mass-damper system with the following parameters:
Mass (m) = 1 kg, Damping coefficient (c) = 3 Ns/m, Spring constant (k) = 2 N/m
Which of the following MATLAB code blocks correctly defines the state-space model and simulates
the displacement response of the system to a unit step force?
A) A = [0 1; -2 -3];
B = [0; 1];
C = [1 0];
D = 0;
sys = ss(A, B, C, D);
step(sys);
B) A = [0 1; -3 -2];
B = [0; 1];
C = [1 0];
D = 0;
sys = ss(A, B, C, D);
impulse(sys);
C) A = [0 1; -2 -3];
B = [1; 0];
C = [1 0];
D = 0;
sys = ss(A, B, C, D);
step(sys);
D) A = [0 1; -2 -3];
B = [0; 1];
C = [0 1];
D = 0;
sys = ss(A, B, C, D);
step(sys);
B: No step response
C: Incorrect B matrix
D: Incorrect C matrix
Q10: Consider a spring-mass-damper system with the following parameters:
Mass (m) = 1 kg, Damping coefficient (c) = 3 Ns/m, Spring constant (k) = 2 N/m
Which of the following MATLAB code blocks correctly defines the state-space model and simulates
the velocity response of the system to a unit step force?
A) A = [0 1; -2 -3];
B = [0; 1];
C = [1 0];
D = 0;
sys = ss(A, B, C, D);
step(sys);
B) A = [0 1; -3 -2];
B = [0; 1];
C = [1 0];
D = 0;
sys = ss(A, B, C, D);
impulse(sys);
C) A = [0 1; -2 -3];
B = [1; 0];
C = [1 0];
D = 0;
sys = ss(A, B, C, D);
step(sys);
D) A = [0 1; -2 -3];
B = [0; 1];
C = [0 1];
D = 0;
sys = ss(A, B, C, D);
step(sys);
A: Incorrect C matrix
B: No step response
C: Incorrect B matrix