Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Sliding Mode Control of DC Motor in MATLAB, Study Guides, Projects, Research of Control Systems

In this document I have implemented slide mode control for sc motor in MATALB environment.

Typology: Study Guides, Projects, Research

2021/2022

Available from 12/18/2022

iambilalarif
iambilalarif šŸ‡µšŸ‡°

2 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download Sliding Mode Control of DC Motor in MATLAB and more Study Guides, Projects, Research Control Systems in PDF only on Docsity! Sliding Mode Control of DC Motor using MATLAB Environment MATLAB CODE % define the physical parameters of the dc motor Ra = 1.0; % armature resistance (ohm) La = 0.5; % armature inductance (H) Kt = 0.01; % motor constant (N.m/A) Kb = 0.01; % back emf constant (V.s/rad) J = 0.01; % moment of inertia (kg.m^2) B = 0.1; % viscous friction coefficient (N.m.s) % define the initial conditions theta0 = 0; % initial position (rad) thetadot0 = 0; % initial angular velocity (rad/s) i0 = 0; % initial armature current (A) % define the time vector for the simulation t = 0:0.001:1; % time vector (s) % define the reference signal r = sin(t); % sine wave reference signal % define the sliding surface s = theta - r; % error between position and reference % define the control gain K = 10; % control gain % define the system state x = [theta0; thetadot0; i0]; % initial state % simulate the system for k = 1:length(t)-1 Ā  Ā  % compute the control signal Ā  Ā  u = -K*sign(s(k)); Ā  Ā  % compute the derivative of the state Ā  Ā  xdot = [x(2); (1/J)*(Kt*x(3)-B*x(2)-Kb*x(2)^2); (1/La)*(u-Ra*x(3)- Kb*x(2))]; Ā  Ā  % update the state Ā  Ā  x(:,k+1) = x(:,k) + xdot*(t(k+1)-t(k)); end % extract the position and current from the state theta = x(1,:); % position (rad) i = x(3,:); % current (A) % plot the results
Docsity logo



Copyright Ā© 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved