You are on page 1of 20

MATLAB

01-05-2021
Dr.MVK
Applications of MATLAB
Installation and Demo of MATLAB
• www.in.mathworks.com
• GetMATLAB
• Try MATLAB
Use gmail id to create a mathworks account

Day 3 MATLAB Applications to Control Systems


Verifying email id

Day 3 MATLAB Applications to Control Systems


Day 3 MATLAB Applications to Control Systems
Day 3 MATLAB Applications to Control Systems
Day 3 MATLAB Applications to Control Systems
Day 3 MATLAB Applications to Control Systems
Day 3 MATLAB Applications to Control Systems
simulink

Current Command window


folder

workspace

Day 3 MATLAB Applications to Control Systems


Day 3 MATLAB Applications to Control Systems
Day 3 MATLAB Applications to Control Systems
2.Plotting of Bode plots, root locus and nyquist plots for the transfer functions
of systems up to 5th order.

• clear all
N=[0 0 10];
• N=[0 0 10]; D=[1 2 3 4 8 0];
N=[0 0 10];
• D=[1 4 8 0]; D=[1 2 4 8 0]; sys2=tf(N,D);
figure(7)
• sys=tf(N,D); sys1=tf(N,D);
rlocus(sys2)
figure(4)
• figure(1) rlocus(sys1) figure(8)
nyquist(sys2)
• rlocus(sys) figure(5)
nyquist(sys1) figure(9)
• figure(3) bode(sys2)
figure(6)
• nyquist(sys) bode(sys1)
• figure(2)
• bode(sys)

Day 3 MATLAB Applications to Control Systems


Simulation of D.C separately excited motor using transfer function approach

Day 3 MATLAB Applications to Control Systems


• R = 2.0; % Ohms
• L = 0.5; % Henrys
• Km = 0.1; % torque constant
• Kb = 0.1; % back emf constant
• Kf = 0.2; % Nms
• J = 0.02; % kg.m^2/s^2
• h1 = tf(Km,[L R]); % armature
• h2 = tf(1,[J Kf]); % eqn of motion
• dcm = (h2) * [h1 , 1]% w = h2 * (h1*Va + Td)
• dcm = feedback(dcm,Kb,1,1)% close back emf loop
• figure(1)
• stepplot(dcm(1));
• figure(2)
• stepplot(dcm(2));
Day 3 MATLAB Applications to Control Systems
ANN model in MATLAB
• Activation functions
• Neuron models
• Training the NN
• Modelling the ANN

You might also like