Task 1: Basic understanding of the system a) Obtain the unit step response of the given…
- User
Task 1: Basic understanding of the system a) Obtain the unit step response of the given open-loop transfer function: G(s) = (-0.0717s^3 - 1.684s^2 - 0.0853s + 0.0622) / (s^4 + 1.0604s^3 - 1.1154s^2 - 0.066s - 0.0512) b) Find the poles and zeros of G(s) and check if it has any poles in the right-half plane (indicating instability). Task 2: Making the system compatible for Bode plot based controller design a) Use MATLAB to plot the Nyquist plot of G(s). From the Nyquist plot, determine a suitable value of Kf such that the effective inner loop transfer function G̃(s) = KfG(s)/(1+KfG(s)) is stable. b) Plot the step response and pole-zero map of G̃(s) to verify its stability. c) Check if the step response of G̃(s) meets any of the three design criteria given. Task 3: Meeting the steady-state error criteria a) Assuming C(s) = C1(s)C2(s), with C2(s) being a Type-0 system, find C1(s) such that the closed-loop system has zero steady-state error for a step input reference. Task 4: Meeting the settling time and maximum overshoot criteria a) Obtain the Bode plot of H̃(s) = -C1(s)G̃(s) and find its gain and phase margins. b) Check if a simple proportional controller C2(s) = Kp can meet the settling time and overshoot specs. c) If not, determine the structure of C2(s) using the Bode plot of H̃(s) such that it meets the specs with stability. d) Tune the parameters of the selected C2(s) structure to meet the settling time (0.05 seconds) and maximum overshoot (20%) criteria. Task 5: Simulate the closed-loop control system a) Find the state-space model of the designed controller C(s) = -C1(s)C2(s). b) Find the state-space model of the open-loop plant G(s) using tf2ss(). c) Combine the controller and plant models to get the closed-loop state-space model. d) Write a MATLAB script simulator.m that simulates this closed-loop model for a given reference r(t) and disturbance ε(t) = A*sin(ωt) using ode45(). It should accept amplitude A, frequency ω, and initial conditions α(0), α_dot(0) as inputs and plot α(t).
- Assistant
- User
solve Task 2
- Assistant
- User
give full code
- Assistant
To encapsulate Task 2 into a cohesive MATLAB script, let's integrate all steps from plotting the Nyquist plot, adjusting (K_f) based on stability consideration, to confirming the system's stability through its step response and pole-zero map. This script assumes a starting (K_f) value and encourages iterative adjustment based on the Nyquist plot's observation.
% Define the given transfer function G(s) num = [-0.0717 -1.684 -0.0853 0.0622]; den = [1 1.0604 -1.1154 -0.066 -0.0512]; G = tf(num,den); % Nyquist plot of G(s) to guide the selection of Kf figure; nyquist(G); title('Nyquist Plot of G(s)'); grid on; % Assuming a value for Kf based on the Nyquist plot to ensure stability % This needs to be adjusted based on the Nyquist analysis Kf = 1; % Define the effective inner loop transfer function G̃(s) = Kf*G(s)/(1+Kf*G(s)) G_tilde = feedback(Kf*G, 1); % Plot the step response of G_tilde(s) figure; step(G_tilde); title('Step Response of \tilde{G}(s)'); % Plot the pole-zero map of G̃(s) figure; pzmap(G_tilde); title('Pole-Zero Map of \tilde{G}(s)'); - User
first get kf for stable
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.