Department of Electrical and Electronics Engineering Matlab Theory and Practice (ELEC 403) Module V, Assignment 5
Department of Electrical and Electronics Engineering Matlab Theory and Practice (ELEC 403) Module V, Assignment 5
Q1. To automatically tune a PID Controller block using PID Tuner in Matlab, you can follow
these steps:
3. In the block dialog, click on the "Tune" button. This will open the PID Tuner.
4. Configure your control system requirements and objectives (e.g., set desired performance
specifications).
5. Click the "Tune" button in the PID Tuner, and it will automatically adjust the PID
parameters to meet your specified requirements.
6. You can analyze the tuned controller's performance and make further adjustments if
necessary.
Q2. To analyze the time-domain and frequency-domain responses of multiple linear models
using Linear System Analyzer in Matlab, follow these steps:
4. In the Linear System Analyzer, you can select and plot the step response, impulse response,
or any other time-domain or frequency-domain response for the imported models.
5. You can compare and analyze the responses of multiple models to assess their performance
and behavior.
Q3. Here's a Matlab program to represent the given state space representation in transfer
function form and perform various analyses:
```matlab
A = [2 3; 4 5];
B = [0; 1];
C = [4 3];
D = 0;
= ss(A, B, C, D);
= tf(sys_ss);
%f degrees\n', Pm);
```
Q4. To design a PID Controller for fast reference tracking using PID Tuner, you would
typically set the performance requirements and follow these steps:
Rishab Sharma A4717020001
3. Double-click the PID Controller block and click on "Tune" to open PID Tuner.
5. Use PID Tuner to automatically tune the PID parameters for fast reference tracking.
7. Analyze the system's response to ensure it meets the reference tracking specifications.
Q5. To analyze the time-domain and frequency-domain responses of one or more linear models
using the Linear System Analyzer in Matlab, follow the same steps as mentioned in the answer
to Q2.
Q6. Bode diagram design involves designing a control system to meet certain frequency
response specifications. The major design steps include:
1. Define Specifications: Specify the desired gain margin, phase margin, and crossover
frequency for your system.
3. Convert to Bode Form: Express G(s) in Bode form (magnitude and phase) using Bode
plots or Matlab.
4. Adjust Controller Parameters: Design or adjust your controller (e.g., PID) to achieve
the desired Bode plot shape.
5. Verify Design: Simulate the system with the designed controller to verify that the
actual frequency response meets the specified requirements.
Rishab Sharma A4717020001
Example:
Let's say you want a system with a gain margin of 6 dB, a phase margin of 45 degrees, and a
crossover frequency of 2 rad/s. You would design and adjust your controller to achieve these
values in the Bode plot.
Q7. The LTI (Linear Time-Invariant) Viewer in Matlab is a tool for analyzing the time and
frequency domain responses of linear systems. To analyze a given LTI system, follow these
steps:
4. You can analyze the time-domain response by selecting "Step Response" or "Impulse
Response" and view the plot.
5. To analyze the frequency-domain response, select "Bode Plot" or "Nyquist Plot" and view
the corresponding plots.
6. You can also customize the analysis by specifying frequency ranges, input signals, and
other parameters.
- Mechanical equation: T = K * I
```matlab
R = 1; % Resistance
L = 0.1; % Inductance
J = 0.02; % Inertia
% State-space matrices
A = [-R/L -K/L;
K/J 0];
B = [1/L; 0];
C = [1 0];
D = 0;
= ss(A, B, C, D);
= tf(sys_ss);
```
Q9. Matlab program to represent the given transfer function in state space form and perform
various analyses:
```matlab
10];
Rishab Sharma A4717020001
= tf(num, den);
B, C, D] = tf2ss(num, den);
degrees\n', Pm);
```