EX-04

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

EXPERIMENT NO.

04

AIM: To analyze the frequency response of a small-motion, linearized model of an industrial


robot using first-order and second-order system approximations in MATLAB, we can follow
these steps:

Step 1: Modeling the Industrial Robot

For small-motion linearization, we approximate the robot's dynamics using either first-order or
second-order models. This can be represented by simple transfer functions.

 First-Order System:

Where:

 K: System gain.
 τ: Time constant.

 Second-Order System:

 Where:
o ωn: Natural frequency.
o ζ: Damping ratio.
o K: System gain.

Step 2: Defining the Transfer Functions in MATLAB

Let's define the transfer functions for both the first-order and second-order systems in MATLAB.

% Parameters for the first-order system

K1 = 1; % Gain

tau = 0.5; % Time constant


% Transfer function for the first-order system

G1 = tf(K1, [tau 1]);

% Parameters for the second-order system

K2 = 1; % Gain

omega_n = 2*pi*1; % Natural frequency (rad/s)

zeta = 0.7; % Damping ratio

% Transfer function for the second-order system

G2 = tf(K2*omega_n^2, [1 2*zeta*omega_n omega_n^2]);

% Display the transfer functions

disp('First-Order System Transfer Function:');

G1

disp('Second-Order System Transfer Function:');

G2

Step 3: Frequency Response Analysis

The frequency response of the system can be analyzed using Bode plots. Bode plots show the
magnitude and phase of the system’s response across a range of frequencies.

% Frequency response (Bode plot) for the first-order and second-order systems

figure;

bode(G1);

hold on;

bode(G2);

title('Frequency Response (Bode Plot) of First-Order and Second-Order Systems');

legend('First-Order System', 'Second-Order System');

grid on;
Step 4: Nyquist Plot

We can also plot the Nyquist diagram to analyze the frequency response.

% Nyquist plot for the first-order and second-order systems

figure;

nyquist(G1);

hold on;

nyquist(G2);

title('Nyquist Plot of First-Order and Second-Order Systems');

legend('First-Order System', 'Second-Order System');

grid on;

Step 5: Interpretation

1. First-Order System:
o The Bode plot for the first-order system will show a single pole at τ −1, with a -20
dB/decade slope in the magnitude plot after the cutoff frequency.
o The phase plot will transition from 0 degrees to -90 degrees as frequency
increases.
2. Second-Order System:
o The Bode plot for the second-order system will show a peak in magnitude near
the natural frequency ωn if the system is underdamped (ζ<1).
o The phase plot will transition from 0 degrees to -180 degrees.
o The Nyquist plot will show how the system behaves in terms of stability and
gain/phase margins.

Conclusion

This approach allows us to analyze the frequency response of a small-motion, linearized model
of an industrial robot using both first-order and second-order system approximations. The
MATLAB code helps visualize the system's behavior across different frequencies, which is
crucial for control system design and stability analysis.

You might also like