Matlab Proportional Controller Code

$0

Description

%% Initialize variables
clc
close all
% Import Data
filename = 'D:\Thesis\Matlab\matlab_system_identification4.txt';
delimiter = '\t';
formatSpec = '%f%f%[^\n\r]';
%% Open the text file.
fileID = fopen(filename,'r');
dataArray = textscan(fileID, formatSpec, 'Delimiter', delimiter, 'ReturnOnError', false);
fclose(fileID);
x = dataArray{:, 1};
x=x/1000;
y = dataArray{:, 2};
%%Import constants
k=0.005;
J=0.0015;
c=.0022 + 9*k^2;
sys=tf(9*k/c,[J/c 1 0]);
%% Proportional Gain
sys1=tf(9*k/c,[J/c 1 0])
[ym,xm]=step(2.7*11.5*sys1);
%step(2.7*11.5*sys1)
xlim([0 10])
figure(1)
rlocus(sys1);
K=0.0218;
H = feedback(K*sys1,1)
figure(2)
step(H)

https://matlab1.com/shop/matlab-code/matlab-and-microcontroller-code-for-controlling-air-conditioner/
https://matlab1.com/shop/matlab-code/matlab-cascaded-controller-code/

Reviews

There are no reviews yet.

Be the first to review “Matlab Proportional Controller Code”
SKU: addx018_1 Category: