Motor speed problem

 

Part I
In this first part, a motor speed problem is presented, and its solution is given step
by step, together with the corresponding MATLAB instructions. Please follow the
derivation and implement the given code, and, where asked to, provide a
justification for what the code does using block diagrams or mathematical analysis.
0) Consider the DC motor described by the simplified first order differential equation
dy
+ 60y = 600u −1500w
dt
where y is the motor speed, u is the input armature voltage, and w is a load (a
disturbance, from the control design point of view).
Assume the initial conditions are zero, and take the Laplace transform:
Y (s) (s + 60) = 600U(s) − 1500W (s)
Y (s) =
600
s + 60
U(s) −
1500 W (s)
s + 60
We will design open and closed loop proportional (P) controllers for this plant. The
control objective is to minimize steady-state error and provide good disturbance
rejection capabilities.
Open-loop proportional control
The controller is designed by assuming that w = 0(that is, no external load is applied
on the motor). From the final value theorem, we set the controller gain to
K =
60
600
(justify this choice!).
1) Find the impulse response of the open-loop control system.
% Define the plant: DC motor
num_motor = 600;
den_motor = [1 60];
motor = tf(num_motor, den_motor)
% Open-loop controller
K = 60/600;
ol_cont = tf(K,1)
% Compute the transfer function from reference to output, without
disturbance
undist_plant = series(ol_cont, motor)
% Plot impulse response
impulse(undist_plant);
title(‘Open-loop control’)
2) Plot the undisturbed step response, for a step of magnitude 100.
% Plot response to a step of size 100
step(100*undist_plant);
title(‘Open-loop response to a step of size 100’)
3) Plot the response to a unit step disturbance, setting the reference to zero. Give
the block diagram of what you are doing here and in the previous item.
% Compute transfer function from disturbance to output, without
reference
dist_plant = (-1500/600)*motor
% Plot response to a unit step disturbance
step(dist_plant);
title(‘Open-loop response to a unit step disturbance’)
4) Plot the open-loop response when both reference and disturbance are present.
% Compute response to both reference and disturbance
t = [0:0.001:0.1]; % time vector
y_ref = step(100*undist_plant,t); % response due to reference
y_dist = step(dist_plant,t); % response due to disturbance
y = y_ref+y_dist; % total response (applying
%superposition!)
plot(t,y);
xlabel(‘Time’)
ylabel(‘Motor speed’)
title(‘Open-loop response to a step reference of magnitude 100 and a
unit step disturbance’);
% Put undisturbed and disturbed responses in one plot
hold on;
plot(t,y_ref,’–‘);
legend(‘With disturbance’,’Without disturbance’)
% try moving the legend with the mouse
grid; % add a grid
hold off;
Closed-loop proportional control
We will first find the transfer function from reference to output:
TRY (s) =
600K
s + (60 + 600K)
(derive it, and provide a block diagram).
Therefore, when W (s) = 0 the output is given by Y (s) = TRY (s)R(s).
Also, the transfer function from disturbance to output is
TWY
(s) =
− 1500 (derive it, and provide a block diagram).
s + (60 + 600K)
Compute the sensitivity of the closed-loop transfer function 𝑇𝑅𝑌(𝑠) with respect to
changes in changes in controller gain 𝐾. How does it compare with 𝑇𝑊𝑌(𝑠)?
When R(s) = 0, the output due to the disturbance is given by Y (s) = TWY (s)W (s).
Combining, if both reference and disturbance are present, the total output is
Y (s) = TRY (s)R(s) + TWY (s)W (s).
Considering these results, how would you want to pick the control constant 𝐾?
(Explain your rationale!)
We will consider two design choices, and compare their performance:
K1 = 10
K2 = 50
1) Plot the step responses for both controllers in one plot.
% verify motor transfer function
motor
% the two controller gains
K1 = 10;
K2 = 50;
% find the transfer function from R(s) to Y(s) for each controller gain
T1_ry = feedback(K1*motor,1) % the 1 indicates unity feedback
T2_ry = feedback(K2*motor,1)
% find the transfer function from disturbance W(s) to output Y(s)
T1_wy = feedback(motor,K1)*(-1500/600)
T2_wy = feedback(motor,K2)*(-1500/600)
% Plot the response to a step of magnitude 100 without disturbance
clf; % clear figure
step(100*T1_ry); % for controller K1
title(‘Closed-loop response to a step of magnitude 100’)
hold on;
step(100*T2_ry); % for controller K2
legend(‘Using K_1′,’Using K_2’);
hold off;
grid;
2) Find an approximation to the steady-state error for both designs from the plot.
zoom on;
% click on the plot with the mouse to find the approximate error value
zoom off;
3) Plot the response to a unit step disturbance for both designs.
% Consider a disturbance step input, with R(s) = 0
step(T1_wy);
hold on;
step(T2_wy);
title(‘Closed-loop response to a step disturbance’);
legend(‘Using K_1′,’Using K_2′);
hold off;
grid;
4) Plot the closed-loop response when both reference and disturbance are present.
% Compute the overall response, when R(s)=100/s and W(s)=1/s
t = [0:1e-6:1e-3];
y1_ref = step(100*T1_ry,t);
y2_ref = step(100*T2_ry,t);
y1_dist = step(T1_wy,t);
y2_dist = step(T2_wy,t);
y1 = y1_ref + y1_dist;
y2 = y2_ref + y2_dist;
plot(t,y1,’r’) % plot response using K1 in red
hold on;
plot(t,y2,’b’) % plot response using K2 in blue
legend(‘Using K_1′,’Using K_2’)
grid;
xlabel(‘Time’)
ylabel(‘Motor speed’)
title(‘Closed-loop response to a step reference of magnitude 100 and a
unit step disturbance’);
hold off;

 

 

Sample Solution

unjustly. Also, in today’s world, wars are no longer fought only by states but also non-state actors like Al-Queda and ISIS, showing Vittola’s normative claim on authority is outdated. This is further supported by Frowe’s claim that the leader needs to represent the people’s interests, under legitimate authority, which links on to the fourth condition: Public declaration of war. Agreed with many, there must be an official announcement on a declaration of war (Frowe (2011), Page 59-60&63). Finally, the most controversial condition is that wars should have a reasonable chance of success. As Vittola reiterated, the aim of war is to establish peace and security; securing the public good. If this can’t be achieved, Frowe argues it would be better to surrender to the enemy. This can be justified because the costs of war would have been bigger (Frowe (2011), Page 56-7). Consequently, jus ad bellum comprises several conditions but most importantly: just cause and proportionality. This gives people a guide whether it’s lawful to enter a war or not. However, this is only one part of the theory of the just war. Nevertheless, it can be seen above that jus ad bellum can be debated throughout, showing that there is no definitive theory of a just war, as it is normatively theorised. Jus in bello The second section begins deciphering jus in bello or what actions can we classify as permissible in just wars (Begby et al (2006b), Page 323). First, it is never just to intentionally kill innocent people in wars, supported by Vittola’s first proposition. This is widely accepted as ‘all people have a right not to be killed’ and if a soldier does, they have violated that right and lost their right. This is further supported by “non-combatant immunity” (Frowe (2011), Page 151), which leads to the question of combatant qualification mentioned later in the essay. This is corroborated by the bombing of Nagasaki and Hiroshima, ending the Second World War, where millions were intently killed, just to secure the aim of war. However, sometimes civilians are accidentally killed through wars to achieve their goal of peace and security. This is supported by Vittola, who implies proportionality again to justify action: ‘care must be taken where evil doesn’t outweigh the possible benefits (Begby et al (2006b), Page 325).’ This is further supported by Frowe who explains it is lawful to unintentionally kill, whenever the combatant has full knowledge of his actions and seeks to complete his aim, but it would

This question has been answered.

Get Answer
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, Welcome to Compliant Papers.