EEM 342 - Advanced MATLAB Quiz (Instructions 1 to 21)
Q1. Define the following state-space system matrices:
A = [0 1 0; 0 0 1; -6 -11 -6]
B = [0; 0; 1]
C = [1 0 0]
D=0
Q2. Find the eigenvalues, eigenvectors, inverse and transpose of matrix A.
Q3. Find the roots of the polynomial p(s) = s^4 + 5s^3 + 6s^2 + 3s + 1.
Q4. Compute the sum, difference, and product of the following matrices:
M1 = [1 2 3; 4 5 6; 7 8 9], M2 = [9 8 7; 6 5 4; 3 2 1]
Q5. Create a state-space system using matrices A, B, C, D.
Q6. Find the transfer function of the state-space system.
Q7. Create the transfer function G1(s) = (3s + 5)/(s^2 + 4s + 6).
Q8. Find a state-space realization of G1(s).
Q9. Find the poles and zeros of G1(s).
Q10. Construct a closed-loop system using unity feedback (H(s) = 1) and G1(s).
Q11. Generate a random 3x1 vector with values in the range [-1, 1].
Q12. Plot and save the initial condition response of the state-space system with x0 = [1; -1; 0] over 0 <= t <=
5.
Q13. Plot and save the response of the system to u(t) = 1 with x0 = [1; -1; 0].
Q14. From the response in Q13, determine and display the maximum, minimum, and steady-state value.
Q15. Plot and save the step response of the system.
Q16. Extract and display the step response data (settling time, overshoot, steady-state value, etc.).
Q17. Plot and save the root-locus of G1(s).
Q18. From the root-locus plot, determine a feedback gain K that stabilizes the system. Display your selected
value.
Q19. Plot and save the Bode plot of G1(s).
Q20. Compute and display the gain margin, phase margin, and crossover frequencies of G1(s).
Q21. Determine a state feedback gain K such that the closed-loop poles of (A - BK) are placed at [-2 -3 -4].