Project - Speed Control of a Direct Current (DC) motor
Q.In this project, a Simulink model for the DC motor will be first developed per the schematic shown in Figure 1.
Use the Proportional, Integral, and Derivative (PID) control design knowledge gained in the training to design, develop and test a controller to maintain a desired speed for the motor.

Project Name: SPEED CONTROL OF A DIRECT CURRENT MOTOR
%Answer:
% I build the simulink model of dc motor using mathematical euations of dc motor, Here the reference signal is taken as step it is yellow line and output is the motor speed it is blue line shown in scope output below.i am using the PID contoller for to force feedback to match a setpoint.it consits have three gains which are proportional–integral–derivative gains in this proportional and integral are not changable externally we will change only intigral value by adjusting the intigral value we will ge the accurate output which is similar to the input.the zeta value is 0.707 and integral value is 40 i was get the scope output , it will be the best performance compare to other ki values.

% The input is taken as step signal yellow line and the motor output is blue line shown in the scope output below the zeta is taken as 0.707 and gain Ki is taken as 50 at starting higly over shoot and sightly undershoot after that it equilibrium it maches to the input step signal. 
% the input is taken as step signal and the output is speed of the motor here the zeta value is taken as 0.707 and gain ki value is 100.the scope shows the input and output plot the yellow line is the input step signal and blue line is the motor output speed,at the gain ki is 100 out put is osciltates overshoot and undershoot aftersome oscilates it will equilibrium.

% The zeta value is taken as 1.0 and integral ki value is 20 scope output shown below it will overshoot at starting but it will take some time for equilibrium position

% the zeta value is taken as 1.0 and ki value is 40 it is best performance compare to changing other ki values at zeta is 1.0 .the motor speed will equilibrium at less time and less undershoot.

% the zeta is taken as 1.0 and changing the intigral value from 40 to 60 the output speed of motor is equilibrium after some of over shoot and undershoot it will take some time for equilibrium position

% the zeta is 1.0 and integral ki value is 100 the scope output is shown below the speed of dc motor will oscilates some time and it will take some time for the equilibrium positionon.

%Finally i will conclude that for zeta is 0.707 the best suitable integral value is 40 it is the best performance.